[whatwg] setting location.hash property and browser reload

Ian Hickson ian at hixie.ch
Sat Jul 25 23:11:27 PDT 2009


On Wed, 8 Jul 2009, Boris Zbarsky wrote:
> Ian Hickson wrote:
> > HTML5 requires that there not be a reload. Setting location.hash eventually
> > (if you follow the admittedly convoluted definitions) is equivalent to
> > running the navigation algorithm:
> > 
> >    http://www.whatwg.org/specs/web-apps/current-work/#navigate
> > 
> > ...which, in step 4, just scrolls and aborts the algorithm without actually
> > changing the active Document object.
> 
> Hmm.  That algorithm doesn't look quite right in the case when going from
> http://example.com/#foo to http://example.com/.  That case should actually do
> the load instead of scrolling, last I checked, unless done as part of a
> history traversal.  See also
> <https://bugzilla.mozilla.org/show_bug.cgi?id=273158>.
> 
> Same thing for the case when going from http://example.com/ to
> http://example.com/ (as comment 5 in the above bug points out).  If I read the
> current draft right, per step 4 that would be a no-op, whereas in practice I
> don't believe it is in browsers...

Fixed. (By saying that the new URL has to have a fragid for any of this to 
kick in.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list