[Javascript] window location hash

Matt Warden mwarden at gmail.com
Fri Mar 23 08:01:45 CDT 2007


On 3/23/07, Guillaume <javascript at webdesignofficina.com> wrote:
>  Here's what I end with:
>
>   var hashValue = "bottomPage";
>   if (hashValue == window.location.hash)
>  {
>  window.location.hash = new String((new Date().getMilliseconds()));
>  }
>  window.location.hash = hashValue;
>  }

My only remaining idea is to try adding a delay.

 var hashValue = "bottomPage";
 if (hashValue == window.location.hash)
{
window.location.hash = new String((new Date()).getMilliseconds());
}

window.setTimeout('window.location.hash = hashValue;', 250);

If this does work, you may wish to sniff out Safari and only insert
the delay for Safari, as it will make your application seem less
responsive.

-- 
Matt Warden
Cleveland, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the Javascript mailing list