[Webkit-unassigned] [Bug 42861] Session history should skip over JS redirects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 27 14:10:23 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42861





--- Comment #10 from Mihai Parparita <mihaip at chromium.org>  2010-07-27 14:10:23 PST ---
At Darin's suggestion, I modified delayed-onload.php to also do a JS redirect inline (not in the onload handler). Here's the results of going to google.com, navigating to the page, waiting for the redirect, and then pressing back for different query values:
                                        Chrome  WebKit  Firefox  IE
  -1 (no timeout, user clicks on link)  page    page    page     page
   0 (navigate inline)                  g.com   page    g.com    page
 200 (navigate after 200ms)             g.com   page    page     page
6000 (navigate after 6000ms)            g.com   page    page     page

(with my patch, the WebKit results would be page/g.com/g.com/g.com)

Interestingly, Firefox still generates a session history entry for JS redirects in timeouts that occur before the page finishes loading (but based on the tests in comment 3, JS redirects during onload don't create one). 

delayed-onload.php delays the page itself finishing loading (so that both DOMContentLoaded and load occur in ~10 seconds). Here's another test, where the DOM should load immediately (firing DOMContentLoaded), but there's a referenced image that takes 10 seconds to load (firing load): http://persistent.info/webkit/test-cases/redirects/delayed-load.html

                                         Chrome  WebKit  Firefox
   0 (navigate during DOMContentLoaded)  g.com   page    page  
 200 (navigate after 200ms)              g.com   page    page
6000 (navigate after 6000ms)             page    page    page

(IE 8 doesn't support DOMContentLoaded; with my patch the WebKit results would be g.com/g.com/g.com)

Basically, it looks like Firefox doesn't create a new history entry if the JS redirect happens inline, or if it's during an onload (but not DOMContentLoaded) handler, whereas my patch doesn't create a new history entry for any JS redirects until onload has finished running. As a web developer, I find that simpler to understand, but if Darin (or anyone else) think that matching the Firefox behavior is better for web compat, I can do that too.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list