Next.js Discord

Discord Forum

Routing issue (I am learing nextjs)

Answered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
I had folder name called "Blog" that started from capital B , it did work but I realized that every folder should have lower case. So , i have edited it to lower case "b" and when i go routing /blog , it changed to /Blog automatically and not routing blog folder , what did i mistake ?
Answered by B33fb0n3
that sounds more like a browser issue. I guess you manually entered the path localhost:3000/Blog and like that the browser remembered it with a capital B. When you now enter it with a small B, the browser will suggest (and auto select) the url with the capital B, because it remembered it, that you entered it.

Like that it could be an illusion that you are going to blog but nextjs redirects you to Blog. So check that and update this thread
View full answer

18 Replies

@Giant panda I had folder name called "Blog" that started from capital B , it did work but I realized that every folder should have lower case. So , i have edited it to lower case "b" and when i go routing `/blog` , it changed to `/Blog` automatically and not routing blog folder , what did i mistake ?
that sounds more like a browser issue. I guess you manually entered the path localhost:3000/Blog and like that the browser remembered it with a capital B. When you now enter it with a small B, the browser will suggest (and auto select) the url with the capital B, because it remembered it, that you entered it.

Like that it could be an illusion that you are going to blog but nextjs redirects you to Blog. So check that and update this thread
Answer
Giant pandaOP
how am i suppose to check that ? I was using chrome brower
looks like i got my answer , i had to clear browser cache
@Giant panda how am i suppose to check that ? I was using chrome brower
enter the path without pressing enter. As you can see in my case: I entered a capital P and the link is pre selected. If I now press enter I won't get redirected to the capital letter
Giant pandaOP
so basically NextJS saves browswer as a cache ?
@Giant panda looks like i got my answer , i had to clear browser cache
yea, the save of the path is saved inside your browser cache
@Giant panda so basically NextJS saves browswer as a cache ?
no, the browser does that
Giant pandaOP
Ah that was the issue , i didn't knew it
Though reactjs does't auto complete the link
exactly
it's independed from any framework. It's stuff that your browser does
Giant pandaOP
Thanks , gotta learning 😄
damn , i can not find "mark solution"
@Giant panda might be , it just gave me a glimp of hint
which one is the most accurate message from me for you?
Giant pandaOP
Oh thats how tick works , good