[webkit-dev] Limiting slow unload handlers (Re: Back/forward cache for pages with unload handlers)

Maciej Stachowiak mjs at apple.com
Wed Sep 16 13:53:21 PDT 2009


On Sep 16, 2009, at 11:23 AM, Geoffrey Garen wrote:

>> Given some of our (Chromium-team) recent investigation into the  
>> contents of unload handlers, I'm not sure how much this move will  
>> help users, even if you don't revert it.  Lots of unload handlers  
>> busy-wait while doing async XHR in order to try to guarantee  
>> delivery of tracking pings.  Authors will probably elect to copy  
>> this code to the pagehide handler rather than moving it, and the  
>> experience for users is still going to be extremely sluggish  
>> navigation out of these pages.
>
> While it's great that you've made improvements for unload handlers  
> (or maybe not-so-great, since you made them only in v8),

I think a good way to deal with poorly written unload handlers is to  
temporarily set the slow script timeout to a much lower value during  
execution of unload. This would not require any JS-engine-specific  
changes to work.

Regards,
Maciej



More information about the webkit-dev mailing list