W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2012

Re: [Page Visibility] Navigate away behavior (was RE: TPAC 2011 Web Performance WG 2011-11-01)

From: Sreeram Ramachandran <sreeram@google.com>
Date: Tue, 15 May 2012 10:21:19 -0700
Message-ID: <CADBeB=-VcGSb7mHF0F89nrkJD1sfiRhCe5+USLr8O-Mzx2nWrg@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-web-perf@w3.org
On Tue, May 15, 2012 at 8:56 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 5/15/12 11:30 AM, Sreeram Ramachandran wrote:
>> Do we need to clarify in the spec that the event fires between load
>> and pageshow
> There would be no visibility change event during an initial page load, if it
> happened in a foreground tab, since the page starts out visible and there is
> no visibility change.

So, to be consistent, I think we should say that visibility change is
NOT fired after pagehide in the case of a true unload, thus
distinguishing it from the case of a document going into the page

I.e., in a normal load/unload scenario, the document never sees a
visibilitychange event. Correspondingly, visibilitychange is fired
after pagehide and before pageshow only for documents going into and
out of pagecache.

Apart from consistency, I think the first part (normal load/unload
flow not firing the event) makes it simpler for both apps and pages.
Received on Tuesday, 15 May 2012 17:22:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:32 UTC