How do I find the information on my current URL in Javascript?
The window.location object which is accessible from Javascript has all this useful information.
window.location.pathnameFor instance gives the path of the URL without the base host and port.
Using this one can write Javascript which alters the behaviour of the page depending on the URL. This would be useful for a site menu for instance.