It feels like we're obsessed with making everything responsive at the moment, but haven't we forgotten something? That's right, what about our URLs? Resize your browser now and see a responsive URL in action. If you're on mobile device you'll already be using the shortened URL, so try this on your desktop.
The URL you're on now is obviously just for demonstration purposes but here's a few real world examples you could use...
yoururl.com/blog/post/example-slug-herecould go to
www.yoururl.comclean it up to
First, we measure your screen width, then your browser width and with a bit of maths, work out which URL will fit best in the address bar. Then using history.replaceState we update the URL. (So you'll need a half decent browser for that to work). But why stop there? What about the other bits outside our HTML canvas; our <title> tags and maybe even our favicons?
Hahahaha, no. This is an absolutely terrible idea, please don't ever do this! You should however definitely follow me on Twitter or tweet this page.
This is just a daft idea by Chris Rowe