I have some javascript code which, at one point, sets window.location.hash
to a specific string. This works fine in Firefox 3, but I want to know if I will run
Setting window.location.hash
works fine in IE6 & IE7.
In some occasions, reading window.location.hash
under IE6 right after a set will return the old value, but the browser has set the hash successfully. An example:
alert(window.location.hash);
window.location.hash = '#newHash';
/* Sometimes, it will return the old value,
I haven't figured out why it does that, and
it's rather rare. */
alert(window.location.hash);
If you are just using it to set it, you shouldn't run into any problems.