I used to think URLs were just addresses on the internet, but when I learned that they actually "tell you about the current state of that page too", it was a real eye-opener for me💡
For example, things like social media posts that everyone often views or the contents of shopping carts on e-commerce sites - these often have information sprinkled into the URL that shows "what you're doing right here and now"✨
URLs Are Like Addresses That Tell the "Current Situation" of a Page
Normally you'd think URLs are just markers for "where to go," but actually URLs also tell you in what state the page is being displayed👀
For instance...
- Filter settings for product listings (color, size)
- Specific tabs or modes on social media
- Partially filled form content
Just by looking at the URL, you can sometimes completely understand "in what state the site is being displayed"💭
Why Put State Information in URLs?
You might think, "Doesn't that make URLs messy?" but there are actually quite a few benefits😳
- You can bookmark pages
- You can share your current screen exactly as is with friends
- The browser's back/forward buttons work properly
With this, users experience less frustration like "every time I go back, it's a completely different page!" and it also makes state management easier for developers🌸
Does URL State Management Seem Difficult?
Honestly, at first I was like "Hmm... I don't get it" too, but once you get used to it, you start thinking "URLs aren't just strings of text, they're mirrors reflecting the current state of the page"💭
Also, knowing this way of thinking makes me feel like when I create my own blog or website, I can make "pages where users don't get lost"🧠✨
Key Takeaways🎀
- URLs aren't just addresses - they often represent the state of the page too
- When state is in the URL, it's easier to bookmark and share links
- Back/forward navigation becomes natural and user-friendly
- Even if it seems difficult at first, it gets interesting as you gradually get used to it
It's impressive how the web world is built up through these small thoughtful touches😆✨
It might seem like a small mechanism, but knowing about it can change your perspective💗
Comments
ハンナ
IBM once sued my company over a patent for maintaining state in URLs, but we were saved because it expired.
グレース
Reading this article reminded me that I once built a platform that put session IDs in URIs, and search engine optimization was really tough.
クリス
I agree, in my project Crums Timechain we also pass certificates via URLs, which makes bookmarking and copying really convenient.









