url Everything You Ever Wanted to Know About URLs but were Afraid to Ask

I don’t know if you have tried to parse an URL yet for some sort of application. You might think it’s a relatively trivial excersize in string parsing. However…take a look at this:

<scheme>://<username>:<password>@<host>:<port>/<path>;<parameters>?<query>#<fragment>

Here is a tutorial on the structure of an URL and all the characters and parameters that go into constructing one.

As a web developer you really have no excuse for not knowing everything there is to know about URLs, there is just not that much to them. But, I have found that even experienced developers often have some glaring holes in their knowledge of URLs. So, I thought I would do a quick tour of everything that every developer should know about URLs. Strap yourself in – this won’t take long :).
What Every Developer Should Know About URLs

Just for fun, here is a Stack Overflow question about parsing the domain name out of an URL.

You might find this PHP libary that ap dot public1 at gmail dot com posted on the parse_url PHP manual page.

The problem of parsing URLs seems to be a good example of computer support/administration as a whole. Something that seems very simple on the surface, often turns out to be incredibly complicated on the back end.

In Soviet Russia, Post's Bookmark YOU!!
  • Facebook
  • Technorati
  • Google Bookmarks
  • StumbleUpon
  • Reddit
  • Yahoo! Buzz
  • Sphinn

Glue Huffing Chickens Picked These Posts: