HTML and CSS Reference
In-Depth Information
Polyfills
A polyfill, or polyfill, is a piece of code (or plugin) that provides the technology that you, the
developer, expect the browser to provide natively. Flattening the API landscape if you will.
—Remy Sharp
Polyfills handle browser differences where support for a bit of technology isn't present. When you run an
advertising campaign, your user base will be on several different browsers and devices. A polyfill is code to handle
these discrepancies. Some typical polyfills deal with emerging features supported in the latest HTML5-compliant
browsers, such as the <canvas> element and video and offline storage. Polyfills are extremely important to use if your
campaign needs to run across browsers and devices. (This information should be outlined in your initial media plan.)
If you are just running an ad targeting a single device or browser, you will generally not need to add a polyfill, as you
can set client expectations to what is currently available on that browser.
Note that there is a very useful online tool called caniuse.com (I'll be mentioning it frequently in the topic).
It breaks down current feature support across all major modern browsers and even gives insight as to what features
will come in future releases. My advice? Bookmark it!
One thing to note is that adding a polyfill will almost always add additional k-weight. Publishers may not find
this an ideal situation, so be sure to flag it as you become aware of it. However, in time, as the HTML5 spec finalizes
and browsers adopt the updates and changes, the need for polyfills will diminish, much like the need for vendor
prefixes, and so the need to add polyfill k-weight bloat will be eliminated. For now, polyfills are integral to the creative
development process and should be used as campaign objectives dictate.
Some really helpful polyfill tools are yepnopejs.com and afarkas.github.com/webshim/demos . However, keep
in mind that most of these are built on top of jQuery or Modernizer, which add additional k-weight. The best solution
is to show your clients what can be done currently. If a campaign needs to run across devices and browsers, you will
almost always need to leverage a polyfill or else significantly scale back the creative design and functionality. Again,
I suggest using caniuse.com , which keeps tabs on what features are available and when.
Browser Extensions
Browser extensions for web development can help you tremendously when you're building a campaign. They allow
you to get inside the browser and figure out how and why certain things happen to your ad creative. This section
reviews use and installation of some very useful extensions for the Webkit, Mozilla, Opera and IE browsers.
When developing for emerging browsers, every developer needs the bare essentials of browser extensions. They
can help debug and breakdown your creative development much more effectively, as they render in the browser what
you'll eventually deploy.
Some extensions are so useful that I'd go so far as to describe them as mandatory. One such is Firebug
( getfirebug.com ). Firebug provides a suite of tools similar to what Google's Chrome browser provides when you
right-click and inspect elements on a page (also known as the browser's web inspector tool). Another useful plug-in
for Mozilla browsers is HttpFox ( addons.mozilla.org/en-US/firefox/addon/httpfox ), which analyzes the HTTP
traffic in your browser. This is very useful when debugging certain API calls to and from a server. These tools are
all vital in the debugging of code, whether it be HTML markup, CSS style and animation, or JavaScript. Other
popular browser extensions are Adblock Plus ( adblockplus.org ) and similar ad blockers, which kill the rendering
of advertisements in the browser. I don't encourage you to install this extension, as it blocks any and all ads and
even some crucial web content not related to advertising. However, its good to understand that these exist, and it
will be interesting to see how future ad blockers will behave (they've traditionally been used to kill domains of Flash
content). If a blocked domain is providing useful content to a user, that content will also be blocked, creating a failed
experience for the end user. My guess is that these extensions need to get much smarter if they want only to effectively
block advertising for their install base. Otherwise, publisher content and other vital web content will be hidden from
the user.
 
Search WWH ::




Custom Search