HTML and CSS Reference
In-Depth Information
if the user is offline
cache.addEventListener('noupdate', handleCacheEvent, false);
cache.addEventListener('obsolete', handleCacheEvent, false);
cache.addEventListener('progress', handleCacheEvent, false);
// When a new manifest is downloaded, swap the new cache assets and reload.
cache.addEventListener('updateready', reloadAssets, false);
function reloadAssets (){
if (cache.status == cache.UPDATEREADY) {
if (confirm('A new version is available')) {
function handleCacheEvent () {
Using the previous JavaScript, you can add event listeners to applicationCache and handle when your assets are
in different stages of the caching process, when they're downloading, and when they're ready to be used, among other
events. This is super-helpful when determining whether the user has the latest and greatest assets for offline use and
when doing general debugging of your cache manifest files.
So, you may be wondering why to cache assets locally. Don't browsers have native caching? Well, true, they do,
but it's often unreliable because users and browsers often clear their cache after the cache pools fills too much or it
could be a default browser setting to clear the cache after each and every browser session.
Caching resources creates faster web content, which is an overall improvement regardless of network
connections. This could be hugely beneficial when you get into dynamic ads where a user will perhaps see a variety of
ad versions throughout the campaign's life cycle. Since only certain portions of the ad will be dynamic (copy, images,
and so on), why not just pull down the dynamic assets on subsequent views and leave the other assets untouched?
This will allow for a faster load time and the ability to pull only the assets you need from the server, thus reducing
the number of requests that need to occur. These practices are being used in many web apps today, including
Google's Gmail for iOS and Android. A very good article on caching and its impact on the web can be found at
for more information and facts on appCache, visit .
Tracking for advertising is a crucial part of any campaign. Analytics teams crave the metrics gathered by ad-serving
companies so they can better adjust their media spend and better educate their clients on what's working and not
working in their online advertising campaigns. To do this, tracking has to be included throughout the ad so that when a
user interacts with the ad content, the reporting companies can learn about the interactions taking place. One important
topic in tracking requirements is the ability to track users when network access is not present. This sort of offline tracking
is big in mobile devices where users are more prone to interact with phone and tablet applications in offline scenarios.
Search WWH ::

Custom Search