HTML and CSS Reference
In-Depth Information
function pauseAd () {
//code to pause ad animation or video
function startAd () {
//code to resume ad animation or video
window.addEventListener('DOMContentLoaded', adInit, false);
As the code shows, you can listen for a state change on the document's visibility and fire the method pauseAd
or startAd , which will, respectively, pause or start an ad's animation or video playback should the creative leverage
these features.
Page Visibility in Advertising
I think you'll agree that in the advertising space, that this could be a huge benefit for providing the best experience to
the user. We can halt animation, video playback, even external requests that are on hidden browser tabs. I'd go as far
as to say that this should be an absolute standard in the future of digital advertising (as browsers adopt this feature).
For even more granularity there's also a plug-in for JQuery to detect elements' visibility on the page. This plug-in
could be even more beneficial when counting true visible ad impressions vs. served impressions or even when
eliminating resources to an ad unit on the page that the user is not currently viewing. Think about it—why initialize
creative content when no one is viewing? “If an ad is served to the page but no one is there to view it, does it still count
as an impression?” Traditionally yes, but with measures like this in place, not for long—and that will give advertisers a
better return for their ad dollars.
To detect element visibility, take a look at the
http://inview plug-in .
At the time of writing, this spec is still in a working-draft state, and so support for the Page Visibility API is pretty
minimal. As I write, it's supported only in Chrome 13+, Firefox 10+, and Internet Explorer 10+. As adoption in the
vendor market and user base grows, I'd like to see wider implementation and possibly even an IAB standard around
this. See for the current
working draft.
Now let's discuss the history API. Every Internet browser has it, and pretty much every Internet user hits the browser's
Back button frequently in order to go back in the browser's time. It's undoubtedly the most popular button in the
browser's overall interface. What the history API brings is a way to add and remove records in the user's browser
history where the data to restore a page's state can be retained and the URL updated without refreshing the page's
content. This approach is much different from selecting the Back button because in doing so, the page will always
Search WWH ::

Custom Search