[PageVisibility] interface to be notified of user idleness

Hello,
I would like to propose an interface enabling site developers to detect when
there is a state of overall user idleness on a system (defined as no
activity on a system's keyboard/mouse/other direct human interface devices)
for a period of time defined by the web developer. I am posting it here
because I think the Page Visibility specification's goals are most closely
aligned with this proposal.

I see there was a related discussion on this list
(http://lists.w3.org/Archives/Public/public-web-perf/2011May/0136.html seems
to be its conclusion; it didn't get very far) but its scope was limited to
detection of inputs directed at the page in question - something that can be
done pretty accurately already, and the old proposal seemed to suggest
replacing the visibility interface entirely with an interface for reporting
idleness. The main difference I am proposing is for the determination of
idleness to be based on an absence of any user inputs to the system rather
than an absence of inputs to the particular webpage, and for it to serve as
a supplement to the page visibility interface rather than a replacement.

I do not believe that this would breach the privacy or security restrictions
one would reasonably expect a web browser to enforce on the pages running
within it - my idleness interface would not allow you to monitor anything
specific about a user's activities outside your application, but would
merely provide a single notification to your application when no user inputs
had occurred for some length of time, a single notification when inputs
resumed, and probably a mechanism for the page to poll for a Boolean current
state of idleness as well.

When expanded to consider all user inputs to the system, I think my proposal
becomes different enough from the previous discussion to warrant some
further consideration. I think that idleness alone is an incomplete measure
of whether computational or battery-intensive tasks should be ramped down,
but I think visibility alone is incomplete as well. 

Besides the possibilities for allowing developers to make more intelligent
performance decisions, this proposal would also enable web applications to
incorporate a more accurate estimation of whether a user was present into
business logic than is currently possible. Consider for example the growing
trend towards real-time interactivity through long-running XMLHTTPRequests
or webSockets. In these applications, humans often interact directly with
each other through the web application in real-time. I think there will be a
growing desire for such applications to be able to report whether a given
user is likely to be responsive.

Thank you for your consideration, I look forward to hearing others'
thoughts.
Mike Baynton

Received on Wednesday, 23 November 2011 09:14:10 UTC