[webkit-dev] Back/forward cache for pages with unload handlers

Darin Fisher darin at chromium.org
Tue Sep 15 22:42:43 PDT 2009

I'm very confused by this change.  If a page has an unload handler, then
Firefox does not put the page in the bfcache.  So the author of a page that
has an unload handler would have no reason to include a pagehide handler.
Does this change mean that unload handlers are never run?  Or, are they run
while the page is hidden (once it is evicted from the page cache)?

I have to say, this seems like a big compatibility bug to me.  What happens
if the page has a beforeunload handler?


On Wed, Sep 9, 2009 at 4:07 PM, Brady Eidson <beidson at apple.com> wrote:

> Since the beginning, WebKit has excluded pages with unload handlers from
> its back/forward cache.  There has been an unspoken assumption for 6 years
> now that we "have to do it."
> In recent explorations to improvements we can make to the back/forward
> cache, we've collected tons of data that suggests:
> -It would be a huge win for end users to remove this restriction, as many
> pages are excluded from the page cache because they have unload handlers.
> -Many are designed to do the same work in the pagehide handler under
> Firefox.
> -Many of these unload handlers don't do anything actually important.
> In our quest to make WebKit better for end users, we'd like to explore
> removing this limitation.  We would like to encourage developers to use
> pagehide in WebKit now that we support it, and we won't know if anything
> truly important breaks until we try it.  I intend to land a patch removing
> the restriction sometime tomorrow.
> If anyone needs to keep it working for their port, please comment in the
> bugzilla before then, as I don't mind one bit #ifdef'ing it so it only
> affects the main Mac/Windows ports:
> https://bugs.webkit.org/show_bug.cgi?id=29021
> Thanks,
> ~Brady
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090915/27add063/attachment.html>

More information about the webkit-dev mailing list