[Webkit-unassigned] [Bug 34679] Location and other objects are dysfunctional after a document gets restored from b/f cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 3 20:14:35 PST 2012


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





--- Comment #6 from Rob B <rob at electronicinsight.com>  2012-02-03 20:14:34 PST ---
We've been hitting this bug pretty hard in mobile Safari since iOS 5 came out. On iOS 4, we could get around this by preventing b/f cache by adding an empty window 'unload' handler, but in iOS 5 Safari this doesn't seem to prevent a page from loading from b/f cache.

Basically, load up the attached index.html (which loads inner.html as an iframe) in iOS 5 Safari. On first load / reload of index.html, you can click send ping to iframe and it will correctly use postMessage to increment the ping's received count inside the iframe. When you click back then fwd and this page loads from the b/f cache in iOS 5, a few bugs occur: 

(a) the iframe listeners are disconnected so pings don't get received by iframe 
(b) anything dynamic in the iframe doesn't work solely inside the iframe itself

This is a huge issue for mobile advertising or anywhere that uses iframes (or any somewhat complex JS). At the very least, is there a known way in iOS 5 / later Webkit versions to prevent a page from loading in b/f cache to work around this bug? (Again, note an empty window unload handler no longer works as workaround in iOS 5 Safari.)

It would be awesome to have iframes, event listeners, JS, etc. work in the b/f cache.

-- 
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