Re: [whatwg] pagehide vs pagevis

On May 30, 2013, at 10:38 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 5/30/13 1:04 PM, Brady Eidson wrote:
>> The long standing design goals and implementation of our page cache
>> prevents us from delivering these events to a page that was just sent
>> “pagehide with persisted set to true”.
> 
> Actually, let me try to clarify this a bit.
> 
> The way I would imagine logic like this being implemented is something like:
> 
>  dispatchPageHide(true);
>  flagPageFrozen();
> 
> with the flagPageFrozen() call making it so that further event dispatch is impossible.
> 
> If that is in fact the case, then logic like this:
> 
>  dispatchPageHide(true);
>  setVisibility("hidden"); // happens to fire an event
>  flagPageFrozen();
> 
> should generally work fine; this is in fact more or less what Gecko does, if we ignore the "pagehide makes the page not cacheable" complication.
> 
> So how does your setup differ in a way that actually makes this impossible to implement?

The design is that after pagehide returns, if the traversal is still taking place and the page is going into the cache, no further events take place.

~Brady

Received on Thursday, 30 May 2013 18:26:35 UTC