UNCONFIRMED Bug 24578
Changing location hash on a frameset causes reload
https://bugs.webkit.org/show_bug.cgi?id=24578
Summary Changing location hash on a frameset causes reload
Jonathan Hurshman
Reported 2009-03-13 10:43:50 PDT
Changing the location hash on a frameset causes the frameset to reload. This occurs whether the hash is changed manually or programmatically by setting window.location.hash. Firefox and IE do not exhibit this behavior; neither non-frameset pages nor frameset pages reload when the hash is changed. This is troublesome for trying to maintain state by setting the hash. Reduction is available at http://pilgrimwebdesign.com/changehash.html. This is a frameset containing only one frame. That frame displays new Date().getSeconds(). It also kicks off a timeout for 5 seconds to set the top's hash value. The result in WebKit is that the whole page reloads every 5 seconds, and one can observe the value displayed in the frame changing. In Firefox and IE, no reload happens. I have reproduced this in the current nightly, in Safari 3.1.2, and in Chrome.
Attachments
Reduction (691 bytes, application/zip)
2009-03-13 10:44 PDT, Jonathan Hurshman
no flags
Display the reload event when the location.hash is changed. (526 bytes, text/html)
2010-04-07 23:05 PDT, Marc Bonnier
no flags
Jonathan Hurshman
Comment 1 2009-03-13 10:44:58 PDT
Created attachment 28585 [details] Reduction
Tolga Arican
Comment 2 2009-04-01 02:38:12 PDT
Sezgin
Comment 3 2009-04-01 02:50:02 PDT
I have same problem too, waiting for immediate action...
Gabor Kormany
Comment 4 2009-09-16 02:09:07 PDT
Hi Same problem here. Frameset based page, using hash to navigate. Safari and chrome doesn't work properly. Though sometimes there is a workaround but overall it increases the development and maintenance time. Best Regards
Tolga Arican
Comment 5 2009-09-16 02:18:34 PDT
Marc Bonnier
Comment 6 2010-04-07 23:05:30 PDT
Created attachment 52828 [details] Display the reload event when the location.hash is changed. Same bug here. Is it possible to assign this light bug to somebody ? Thanks.
TomSW
Comment 7 2011-12-17 08:40:00 PST
The current behaviour is caused by FrameLoader::shouldScrollToAnchor in WebCore/loader/FrameLoader.cpp. Scrolling to an anchor is explicitly excluded for a frameset, the reason is given in the comments: "we don't want to just scroll if a link from within a frameset is trying to reload the frameset into _top." In Firefox a link from within the frameset can reload the frameset, but only as long as the link contains no hash. ie <a href="index.html" target="_top">Reload!</a> will reload the frameset but <a href="index.html#" target="_top">Reload!</a> will not.
Note You need to log in before you can comment on or make changes to this bug.