This page is for developers to use in order to find your code.
This is the most specific location query you can use for your web pages. The hash is the code that goes with the URL, so for example if you were calling, for example, then the location.hash would contain the code for that page.
The hash is the only place you should use for the location query. That’s because if you don’t use it, then all you have is a very poor, broken link. People have no way of knowing how your website is linked to and there is no way of knowing if this link is broken or not. It’s just a bad link.
Well that’s not entirely true. Sometimes you can get around this by using an iframe. It basically just requires you to use your local hash to identify the location of the iframe. If your hash matches the hash of the iframe, then you can be assured that the iframe is the real target. If your URL is broken, then you can not be sure what is being called. The hash in the iframe is just another way of identifying the location.
The good news is that you can get around browser security issues by using hashbang anchors. This is especially helpful if you write your URLs in such a way that they cannot be parsed by browser’s URL scheme and you need to add your hash and href values so that they can be used by your browser to find resources on the site.
The navigation bar is the obvious target for navigation when using hashbang anchors, and if you want to make the navigation bar the target of a navigation bar, then use the iframe in this case.
We have learned a lot from the IE6 implementation, and have updated it with the latest version of CSS3. IE6 used to have a “hidden window.location.hash” value. IE7 and 8 have changed that to “window.location.hash.replace(/[^#]/, ‘#’)”. And we’re now using the latest version of IE8, which also includes the hashbang attribute.
The problem is that there’s another version of IE7 and 8 that are using the old hashbang attribute. This would be a problem if you were running a site on IE7 and 8 that contained a hashbang URL. These are still very much supported, so you can still get away with the old hashbang attribute.