<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Mobify &gt; Blog</title><link href="http://www.mobify.com/" rel="alternate"></link><link href="http://www.mobify.com/feeds/blog.atom.xml" rel="self"></link><id>http://www.mobify.com/</id><updated>2013-05-13T10:00:00-07:00</updated><entry><title>Smartphone Browser localStorage is up to 5x Faster than Native Cache (New Research)</title><link href="http://www.mobify.com/blog/smartphone-localstorage-outperforms-browser-cache/" rel="alternate"></link><updated>2013-05-13T10:00:00-07:00</updated><author><name>Peter McLachlan</name></author><id>tag:www.mobify.com,2013-05-13:blog/smartphone-localstorage-outperforms-browser-cache/</id><summary type="html">&lt;div&gt;&lt;p&gt;As a web developer you know that creating engaging web UX means quickly delivering content that captures your visitor's attention. &lt;/p&gt;
&lt;p&gt;The &lt;a href="http://www.w3.org/TR/2009/WD-webstorage-20090423/"&gt;storage API&lt;/a&gt;, including localStorage, was designed to help web developers provide more app-like behaviour for the web than &lt;a href="http://en.wikipedia.org/wiki/HTTP_cookie"&gt;cookies&lt;/a&gt; previously allowed. &lt;/p&gt;
&lt;p&gt;But it turns out you can also use localStorage to make your mobile website faster! &lt;/p&gt;
&lt;p&gt;How much faster? Well, you can load some critical path resources such as a JavaScript that's required for your UX up to 3 - 5x faster using localStorage than from the browser's native cache. Using millions of data points from &lt;a href="http://en.wikipedia.org/wiki/Real_user_monitoring"&gt;Real User Monitoring (RUM)&lt;/a&gt; I had the following surprising results. &lt;/p&gt;
&lt;figure&gt;&lt;a href="http://www.mobify.com/static/blog/2013/05/localStorage/plot-mean-bar.png"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/05/localStorage/plot-mean-bar.png" alt="Bar plot of trimmed means."&gt;&lt;/a&gt;
&lt;/figure&gt;&lt;figcaption&gt;
  20% trimmed mean results of native browser cache vs localStorage performance. Mean performance for localStorage is always faster than the browser's native cache and for iOS 5 &amp;amp; 6, dramatically so. 
&lt;/figcaption&gt;&lt;p&gt;&lt;br&gt;
What does this mean? It means you should absolutely be using localStorage for essential resources rather than depending on the browser's cache. This is a bold claim I'm happy to back with data, and I'm also very curious to hear from the community on your own test results. For more details on how I collected and analyzed my results, read on.&lt;/p&gt;


&lt;h3&gt;Background: the web community weighs in on localStorage&lt;/h3&gt;
&lt;p&gt;Web developers may have read some discussion in early 2012 when web storage APIs experienced a &lt;a href="http://blog.mozilla.org/tglek/2012/02/22/psa-dom-local-storage-considered-harmful/"&gt;flurry&lt;/a&gt; of &lt;a href="http://www.nczonline.net/blog/2012/04/25/the-performance-of-localstorage-revisited/"&gt;concern&lt;/a&gt; around performance. &lt;/p&gt;
&lt;p&gt;The most concise summary of the developer community's performance concerns are expressed in &lt;a href="https://twitter.com/codepo8"&gt;Chris Heilmann&lt;/a&gt;'s &lt;a href="https://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-storage/"&gt;post on Mozilla Hacks&lt;/a&gt;. Chris's arguments hinge on four key criticisms of localStorage:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;localStorage is synchronous (can block rendering)&lt;/li&gt;
&lt;li&gt;localStorage performs file I/O (unbounded worst case performance)&lt;/li&gt;
&lt;li&gt;Browsers load the data into memory on the first request (wastes user-agent RAM)&lt;/li&gt;
&lt;li&gt;localStorage is persistent (if you never visit a site again, disk space is wasted)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;These criticisms notwithstanding, localStorage remains attractive for mobile web developers for several reasons: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Browser native caches are shared between websites and are often small on mobile devices - as &lt;a href="http://twitter.com/guypod"&gt;Guy Podjarny&lt;/a&gt; has determined, &lt;a href="http://www.guypo.com/uncategorized/mobile-browser-cache-sizes-round-2/"&gt;sometimes smaller than 5MB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Some browser caches are not persistent (contents lost when the app exits)&lt;/li&gt;
&lt;li&gt;Native browser cache performance &amp;amp; behavior of mobile user-agents is highly variable&lt;/li&gt;
&lt;li&gt;Latency on mobile is high - good caching is required for good performance&lt;/li&gt;
&lt;li&gt;localStorage content eviction policy is directly under developer control, browser native cache is not&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;That localStorage is synchronous, performs file I/O, uses RAM &amp;amp; storage on user-agents is not in dispute. However, what is important is to find out what the performance is like in actual smartphone browsers executing scripts on &lt;a href="http://www.mobify.com/blog/web-performance-optimization/" title="Does Mobile Web Performance Optimization Still Matter?"&gt;real websites in the wild&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Experimental design&lt;/h3&gt;
&lt;p&gt;The experiment focused on the time taken to load a 25KB (uncompressed size) JavaScript payload. The content of the JavaScript payload was the &lt;a href="http://akdubya.github.io/dustjs/"&gt;Dust templating&lt;/a&gt; library with one small modification - after the library is loaded, a hook was executed to notify the RUM test that loading was complete so that time to load could be measured accurately. There were two experimental conditions, described below. Data collected included the user-agent, condition &amp;amp; the timing result.&lt;/p&gt;
&lt;h4&gt;Condition 1: browser native cache performance&lt;/h4&gt;
&lt;p&gt;The objective of condition 1 was to benchmark performance of the browser native cache on smartphones. In this condition, the JS payload is loaded twice, the first time to populate the browser cache and the second to measure timing for instantiating a script from browser cache. The payload is delivered with both a one month future &lt;code&gt;EXPIRES&lt;/code&gt; and &lt;code&gt;CACHE-CONTROL: max-age=2592000&lt;/code&gt; headers set (if you're not familiar with cache control headers, or want a refresh, &lt;a href="http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/"&gt;this is a great introduction&lt;/a&gt;). In this condition the content of the payload is set using the &lt;code&gt;src=&lt;/code&gt; attribute of a &lt;code&gt;script&lt;/code&gt; tag. &lt;/p&gt;
&lt;h4&gt;Condition 2: localStorage performance&lt;/h4&gt;
&lt;p&gt;The objective of condition 2 was to benchmark performance of localStorage on smartphones. In this condition, the JS payload is first written to localStorage after being JSON-encoded. After the payload is stored, I read back the content of localStorage and measure the time taken for the JavaScript contained in the payload to execute the callback hook. In this condition the content of the payload is inserted inside a &lt;code&gt;script&lt;/code&gt; tag as a textnode.&lt;/p&gt;
&lt;h4&gt;Experiment validity threats&lt;/h4&gt;
&lt;p&gt;The most significant threat to the validity of this experiment is that in both conditions I am retrieving the data immediately after writing it. A subsequent test might involve reading data several days later when other browsing activity has taken place. However -- this modified experiment is &lt;em&gt;unlikely to favor the native cache&lt;/em&gt; as it is much more likely that content will be evicted from the native cache after several days of user browsing activity. localStorage does not suffer from this eviction problem. In this respect, I believe these results understate the performance improvement available from using localStorage.&lt;/p&gt;
&lt;p&gt;The second validity threat is that performance may vary if localStorage is fully utilized. &lt;a href="https://twitter.com/hobohacker"&gt;Will Chan&lt;/a&gt; measured &lt;a href="https://insouciant.org/tech/time-to-load-localstorage-into-memory/"&gt;desktop localStorage performance&lt;/a&gt; for relatively small storage sizes - and saw very good results on desktop as well. What's interesting is that he found that &lt;a href="https://insouciant.org/tech/localstorage-load-times-redux/"&gt;performance degrades&lt;/a&gt; considerably as the amount of data stored in localStorage in desktop Chrome increases. More testing is required to determine the impact of a heavily utilized localStorage cache on mobile. &lt;/p&gt;
&lt;h3&gt;Results&lt;/h3&gt;
&lt;p&gt;For data analysis, I applied a &lt;a href="http://en.wikipedia.org/wiki/Truncated_mean"&gt;20% trimmed mean&lt;/a&gt; to both native browser cache and localStorage conditions discarding 10% of the lowest and highest measured results. This was done to reduce the sensitivity of the results to outliers and is considered a robust estimator. &lt;/p&gt;
&lt;figure&gt;&lt;a href="http://www.mobify.com/static/blog/2013/05/localStorage/mainResult.png"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/05/localStorage/mainResult.png" alt="Candlestick plot of localStorage performance results."&gt;&lt;/a&gt;
&lt;/figure&gt;&lt;figcaption&gt;
  This candlestick plot shows the results of my performance test. For each browser type and condition, I plot the &lt;strong&gt;mean&lt;/strong&gt; (red mark), the &lt;strong&gt;95% &lt;a href="http://en.wikipedia.org/wiki/Confidence_interval"&gt;confidence interval&lt;/a&gt;&lt;/strong&gt; (dark gray box), and the &lt;strong&gt;min/max&lt;/strong&gt; values (whiskers).
&lt;/figcaption&gt;&lt;p&gt;&lt;br&gt;
The figure above summarizes my results. As you can see the mean performance of localStorage is better than browser native cache behaviour in all cases. In many notable cases, such as iOS 5 and iOS 6, &lt;em&gt;localStorage outperforms mean native cache performance by a factor of 5&lt;/em&gt;. Summary values are in the table below. &lt;/p&gt;
&lt;table&gt;&lt;tr&gt;&lt;th&gt;Smartphone OS&lt;/th&gt;
    &lt;th&gt;localStorage&lt;br&gt;Mean (ms)&lt;/th&gt;
    &lt;th&gt;native browser&lt;br&gt;Mean (ms)&lt;/th&gt;
    &lt;th&gt;localstorage&lt;br&gt;StdDev&lt;/th&gt;
    &lt;th&gt;native browser&lt;br&gt;StdDev&lt;/th&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Android 2.2&lt;/td&gt;
    &lt;td&gt;299.94&lt;/td&gt;
    &lt;td&gt;509.32&lt;/td&gt;
    &lt;td&gt;164.76&lt;/td&gt;
    &lt;td&gt;537.95&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Android 2.3&lt;/td&gt;
    &lt;td&gt;133.50&lt;/td&gt;
    &lt;td&gt;154.76&lt;/td&gt;
    &lt;td&gt;57.65&lt;/td&gt;
    &lt;td&gt;215.13&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Android 4.0&lt;/td&gt;
    &lt;td&gt;97.05&lt;/td&gt;
    &lt;td&gt;103.44&lt;/td&gt;
    &lt;td&gt;31.80&lt;/td&gt;
    &lt;td&gt;179.36&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Android 4.1&lt;/td&gt;
    &lt;td&gt;75.60&lt;/td&gt;
    &lt;td&gt;85.57&lt;/td&gt;
    &lt;td&gt;21.60&lt;/td&gt;
    &lt;td&gt;132.03&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Android 4.2&lt;/td&gt;
    &lt;td&gt;55.28&lt;/td&gt;
    &lt;td&gt;83.76&lt;/td&gt;
    &lt;td&gt;23.28&lt;/td&gt;
    &lt;td&gt;121.51&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;iPhone iOS5&lt;/td&gt;
    &lt;td&gt;21.61&lt;/td&gt;
    &lt;td&gt;132.90&lt;/td&gt;
    &lt;td&gt;8.64&lt;/td&gt;
    &lt;td&gt;177.69&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;iPhone iOS6&lt;/td&gt;
    &lt;td&gt;15.71&lt;/td&gt;
    &lt;td&gt;73.86&lt;/td&gt;
    &lt;td&gt;7.27&lt;/td&gt;
    &lt;td&gt;109.32&lt;/td&gt;
  &lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Variance in localStorage performance is much smaller than browser native cache variance. This can be seen by the much smaller confidence interval present in the localStorage condition. It's also readily apparent in the &lt;a href="http://en.wikipedia.org/wiki/Standard_deviation"&gt;standard deviation&lt;/a&gt; column of the table above. This is especially true for Android 2.2 devices where native cache behaviour varies wildly, but the effect is present in all devices, including newer smartphones running both the iOS and Android operating systems. &lt;/p&gt;
&lt;p&gt;On Android the minimum time (bottom whisker on the candlestick plot) measured for native cache performance beats the minimum time from localStorage. This suggests that under ideal circumstances the native cache is faster, but my real world tests suggest these ideal circumstances are the exception rather than the rule and mediocre or worst-case behavior from the native cache is common. On iOS 5 and iOS 6 the minimum load time for localStorage and native browser behaviour are nearly identical, but mean time for localStorage is significantly faster. &lt;/p&gt;
&lt;p&gt;For completeness, I've included in the &lt;a href="http://www.mobify.com/blog/smartphone-localstorage-outperforms-browser-cache/appendix/"&gt;appendix&lt;/a&gt; the histogram data from each of the OS versions measured for both browser native cache and localStorage conditions. Features of note are described in the captions. These graphs provide more insight into the mediocre &amp;amp; worst-case behavior of native caches and localStorage.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;localStorage is an attractive alternative to the mobile browser's native cache for critical page resources with much better average-case performance (2-5x better for recent OS releases) than the native cache. Because web developers have explicit control over the eviction strategy from localStorage, key resources can be preserved or updated in a more optimal way than is possible with generic native browser caching strategies.&lt;/p&gt;
&lt;h3&gt;Final caveats&lt;/h3&gt;
&lt;p&gt;There are very significant performance gains to be realized by using localStorage. Keep in mind, however, that there are also tradeoffs when using localStorage. &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;localStorage space is relatively small, 5MB on most browsers, and it can only store string data. This is effectively halved because localStorage stores strings as double-byte characters (UTF-16).&lt;/li&gt;
&lt;li&gt;localStorage reads and writes do block the rendering thread. Where possible reads/writes should be done after initial page rendering is complete. You may want to avoid operations that are likely to cause performance problems such as a very large numbers of operations (thousands or tens of thousands of reads or writes), as well as read/write operations larger than 1MB.&lt;/li&gt;
&lt;li&gt;Browsers should do a better job of exposing storage space used by websites taking advantage of the web storage APIs to smartphone users. Be a good neighbour and don't use localStorage recklessly, use it for key resources that are in your critical path. &lt;/li&gt;
&lt;li&gt;You'll need to manage your website's cache eviction &amp;amp; resource updates to localStorage manually.&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Your Turn&lt;/h3&gt;
&lt;p&gt;Do you use localStorage API in your work? What do you use it for and how does it perform? &lt;/p&gt;
&lt;p&gt;Let me know by leaving a comment!&lt;/p&gt;
&lt;h3&gt;Appendix&lt;/h3&gt;
&lt;p&gt;Additional data plots are available &lt;a href="http://www.mobify.com/blog/smartphone-localstorage-outperforms-browser-cache/appendix/"&gt;in the appendix&lt;/a&gt;.&lt;/p&gt;
&lt;!-- 
References:

(Mat Scales)
http://blog.mozilla.org/tglek/2012/02/22/psa-dom-local-storage-considered-harmful/ (Taras Glek)
https://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-storage/ (Chris Heilmann)
http://www.webdirections.org/blog/localstorage-perhaps-not-so-harmful/ (John Allsopp)
http://www.nczonline.net/blog/2012/04/25/the-performance-of-localstorage-revisited/ (Nicholas C. Zakas) --&gt;&lt;/div&gt;</summary></entry><entry><title>2 Fake Companies and a Killer Unmasked: The Story of Mobify's First Hackathon</title><link href="http://www.mobify.com/about/culture/mobifys-first-hackathon/" rel="alternate"></link><updated>2013-05-03T12:00:00-07:00</updated><author><name>David Fay</name></author><id>tag:www.mobify.com,2013-05-03:about/culture/mobifys-first-hackathon/</id><summary type="html">&lt;div&gt;&lt;div class="image-700x350"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/shank_twitter_bg.min.png" alt="Shankworks Inc at Morbify, Mobify's first hackathon"&gt;&lt;/div&gt;

&lt;p&gt;What do you get when you combine a hackathon with a murder mystery? The answer is 'Morbify', (probably) the world's first murder mystery hackathon. &lt;/p&gt;
&lt;p&gt;So how did it work? Well, if you've been to a hackathon before, you'll know that they typically have a theme. After much deliberation, we decided to make ours &lt;em&gt;the gamification of everyday tasks&lt;/em&gt;. &lt;/p&gt;
&lt;p&gt;And if you've ever been to a murder mystery before, you'll know that they typically have a crazy story that unfolds during the event. So we went ahead and unleashed a team of our best writers onto the challenge of creating the most hackathon appropriate murder mystery ever made. &lt;/p&gt;


&lt;p&gt;Here's what hackathon attendees knew about the event in advance:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You've just been hired by trendy video game company, &lt;a href="http://www.twitter.com/shankworks_inc"&gt;Shankworks Inc&lt;/a&gt;. Congratulations! On the back of their wildly successful first game - StabCat - Shankworks Inc. has been on a hiring spree. You are one of 30 new employees starting at Shankworks HQ on the same day! &lt;/p&gt;
&lt;p&gt;Eager to eclipse the success of StabCat with an even better product, all new employees have been issued a challenge - create Shankworks Inc's next big viral hit by creatively gamifying some everyday tasks. You'll work in teams, and the team with the best product by the end of the day will be showered with glory.  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;div class="image-700x350"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/stabcat.min.jpg" alt="StabCat, Shankworks Inc's game"&gt;&lt;/div&gt;
&lt;figcaption&gt;A sticker of Shankworks Inc's runaway hit, StabCat.&lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;A killer case of corporate collapse&lt;/h3&gt;
&lt;p&gt;As murder mysteries tend to do, the story of 'Morbify' revealed its sordid twists and turns in a series of staged events. &lt;/p&gt;
&lt;p&gt;It began over drinks at &lt;a href="http://www.expbar.ca/"&gt;EXP Bar&lt;/a&gt;, where 'new employees' (read: hackathon participants) met the CEO of Shankworks Inc., played by Mobify's own CEO, Igor. &lt;/p&gt;
&lt;figure&gt;&lt;blockquote class="twitter-tweet" align="center"&gt;&lt;p&gt;Amazing things are happening at @&lt;a href="https://twitter.com/shankworks_inc"&gt;shankworks_inc&lt;/a&gt;! We're celebrating the new hire of 30 new employees! &lt;a href="http://t.co/MMUHs0l82F" title="http://twitter.com/Shankworks_Inc/status/315339231247601664/photo/1"&gt;twitter.com/Shankworks_Inc&amp;#8230;&lt;/a&gt;&lt;/p&gt;&amp;#8212; Shankworks Inc. (@Shankworks_Inc) &lt;a href="https://twitter.com/Shankworks_Inc/status/315339231247601664"&gt;March 23, 2013&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src="http://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;&lt;/figure&gt;&lt;p&gt;Alas, the good times weren't to last. Upon arriving at Shankworks HQ in the morning, attendees soon discovered that Igor had been murdered during the night: &lt;/p&gt;
&lt;figure&gt;&lt;blockquote class="twitter-tweet" align="center"&gt;&lt;p&gt;Sorry to get your hopes up &lt;a href="https://twitter.com/search/%23shankathon"&gt;#shankathon&lt;/a&gt;-ees - looks like our CEO Igor has, erm, called in sick today.&lt;/p&gt;&amp;#8212; Shankworks Inc. (@Shankworks_Inc) &lt;a href="https://twitter.com/Shankworks_Inc/status/315511576453079040"&gt;March 23, 2013&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src="http://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;&lt;/figure&gt;&lt;p&gt;While the majority of time during the day was allocated to furiously gamifying everyday tasks, every hour, for five minutes, hacking came to a halt while a scene unfolded in the middle of the event space. Each scene revealed clues about the characters and explored motivations they might have had for committing murder. &lt;/p&gt;
&lt;figure&gt;&lt;div class="image-700x350"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/conflict1.min.jpg" alt="Alt text"&gt;&lt;/div&gt;
&lt;figcaption&gt;High school drama lessons definitely came in handy as tempers flared, accusations were made, and tears were shed. Here, Shanksworks Inc. CTO, Jacky Sabatier, is exploding at Inspector Henckels for publicly announcing Igor's demise.&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;The murder mystery descended into madness throughout the day. By mid-afternoon, the official &lt;a href="http://www.twitter.com/shankworks_inc"&gt;@Shankworks_Inc&lt;/a&gt; Twitter account had been hijacked by the killer, who had also tweeted out pictures and videos of multiple additional murders he/she committed during the day:&lt;/p&gt;
&lt;figure&gt;&lt;blockquote class="twitter-tweet" align="center"&gt;&lt;p&gt;Ha. Good luck working for @&lt;a href="https://twitter.com/the_doodle_inc"&gt;the_doodle_inc&lt;/a&gt; , traitor &lt;a href="https://twitter.com/search/%23shedeadtoo"&gt;#shedeadtoo&lt;/a&gt;&lt;a href="https://twitter.com/search/%23shankathon"&gt;#shankathon&lt;/a&gt; &lt;a href="http://t.co/wentNGOCCo" title="http://yfrog.us/f5ylblmkmugvdeojlncoczoiz"&gt;yfrog.us/f5ylblmkmugvde&amp;#8230;&lt;/a&gt;&lt;/p&gt;&amp;#8212; Shankworks Inc. (@Shankworks_Inc) &lt;a href="https://twitter.com/Shankworks_Inc/status/315539907298877440"&gt;March 23, 2013&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src="http://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;&lt;figcaption&gt;Another murder! Angelina Arthur-Price, Creator of StabCat, didn't make it through the day.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&gt;&lt;blockquote class="twitter-tweet" data-conversation="none" align="center"&gt;&lt;p&gt;Sorry David - you guessed right. &amp;#8220;@&lt;a href="https://twitter.com/davidmfay"&gt;davidmfay&lt;/a&gt;: I think I know who the killer is! &lt;a href="https://twitter.com/search/%23shankathon"&gt;#shankathon&lt;/a&gt;&amp;#8221;&lt;a href="http://t.co/XEu0XflVix" title="http://yfrog.us/mj9b3huxnqeoqbbgtacuxghkz"&gt;yfrog.us/mj9b3huxnqeoqb&amp;#8230;&lt;/a&gt;&lt;/p&gt;&amp;#8212; Shankworks Killer (@REAL_Shankworks) &lt;a href="https://twitter.com/REAL_Shankworks/status/315583677587394560"&gt;March 23, 2013&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src="http://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;&lt;figcaption&gt;A third murder! David from the Shankworks marketing team met with a sticky end.&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;After all the everyday tasks had been gamified, it was up to hackathon participants to identify the killer using the not-so-subtle hashtag #thekilleris. When all the guesses were submitted, the culprit was identified and apprehended on the spot: &lt;/p&gt;
&lt;figure&gt;&lt;div class="image-700x350"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/insphjustice.min.jpg" alt="Inspector Henckles at the Morbify hackathon"&gt;&lt;/div&gt;
&lt;figcaption&gt;Inspector Henckles outlining his case.&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure&gt;&lt;div class="image-700x350"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/candace.min.jpg" alt="The secret killer of the Mobify hackathon"&gt;&lt;/div&gt;
&lt;figcaption&gt;The criminal mastermind and 'Shankworks Killer', Candace Shiv, being led away to prison.&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;As someone who has never been to either a hackathon &lt;em&gt;or&lt;/em&gt; a murder mystery, I can say that Morbify was a crazy, weird, and extremely enjoyable experience to be a part of. What's more, the quality of the projects that came out of the event were absolutely amazing&amp;#8211; more details to come soon! &lt;/p&gt;
&lt;div class="image-700x350"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/hacking.min.jpg" alt="hackathon attendees and Shankworks Inc employees"&gt;&lt;/div&gt;

&lt;hr&gt;&lt;p&gt;&lt;em&gt;If you didn't get a chance to be a part of Morbify, make sure, you sign up for Mobify's next hackathon! For all the latest updates on events and going-ons around Mobify HQ, please feel free to follow us &lt;a href="http://www.twitter.com/mobify"&gt;@Mobify&lt;/a&gt; and &lt;a href="http://www.twitter.com/mobifycareers"&gt;@MobifyCareers&lt;/a&gt;.&lt;/em&gt; &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A Beginner's Guide to HTTP Cache Headers</title><link href="http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/" rel="alternate"></link><updated>2013-04-30T10:00:00-07:00</updated><author><name>Kyle Young</name></author><id>tag:www.mobify.com,2013-04-30:blog/beginners-guide-to-http-cache-headers/</id><summary type="html">&lt;div&gt;&lt;p&gt;This article offers an exploration into HTTP caching headers and associated
CDN behaviour. If you're looking to understand how caching headers fit into the
modern web, or are just curious about what everyone is talking about around you,
this resource is for you.&lt;/p&gt;
&lt;p&gt;If you already understand the benefits of cache headers and are looking to
extend your knowledge further, I'd recommend referring to the
&lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"&gt;W3
documentation&lt;/a&gt;.&lt;/p&gt;


&lt;h3&gt;What Can Cache Headers Do for You?&lt;/h3&gt;
&lt;p&gt;Simply put, caching allows you to store your web assets on remote points along
the way to your visitors&amp;#8217; browsers. Of course the browser itself also maintains
an aggressive cache, which keeps clients from having to continually ask your
server for a resource each time it comes up.&lt;/p&gt;
&lt;p&gt;Cache configuration for your web traffic is critical for any performant site. If
you pay for bandwidth, make revenue from an e-commerce site, or even just like
keeping your reputation as a web-literate developer intact, you need to know
what caching gets you and how to set it up.&lt;/p&gt;
&lt;p&gt;In the case of assets, things like your company logo, the favicon for your site,
or your core CSS files aren't likely to change from request to request, so it is
safe to tell the requester to hold onto their copy of the asset for a while. If
your visitors were small children in the backseat asking, "Are we there yet?"
repeatedly, this would be like telling them, "No, and we won't be for 20 more
minutes, so remember my answer."&lt;/p&gt;
&lt;p&gt;By cutting down on the requests your server has to deal with, you are able to
handle more requests, and your users will enjoy a faster browsing experience.
Generally, assets like images, JavaScript files, and style-sheets can all be
cached fairly heavily, while assets that are dynamically generated, like
dashboards, forums, or many types of web-applications, benefit less, if at all.
If your concern is performance, your dynamic content will be shunted to a bare
minimum of AJAX-type resources, while the rest of your assets will be heavily
cached.&lt;/p&gt;
&lt;h4&gt;For Clients &amp;amp; CDNs&lt;/h4&gt;
&lt;p&gt;Historically, cache settings were all about the client's browser, so we
shouldn't forget the benefits of properly considering the client and the way it
keeps assets around during a session and on return visits. However, these days,
with the advent of Content Delivery Networks (CDNs), a bigger concern is how
caching is handled on the intermediary points of web traffic.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What are CDNs?&lt;/p&gt;
&lt;p&gt;In case you don&amp;#8217;t want to read the &lt;a href="http://en.wikipedia.org/wiki/Content_delivery_network"&gt;wiki article&lt;/a&gt;
, I'll give you the crib notes here. Essentially, CDNs are servers, (note
the plural), that sit between your end user and your server. Each of these
servers are designed to cache your content according to the cache rules you
set in the various HTTP headers outlined below.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When configured properly, CDNs will deliver content to your end user from the
fastest, (and typically closest) server available. Additionally, CDNs act as a
buffer between you and your users. The number we are most concerned with is the
cache hit ratio, which describes the percentage of requests the CDN was able to
answer out of its own cache without having to bother our servers. Depending on
your traffic and architecture, this number can get well into the high nineties,
although even at lower figures you'll experience a gain. (Keep in mind that a
low frequency of requests will mean a larger percentage of requests go back to
your server, so the ratio is only meaningful when understood together with your
cache times and the general load of your site.) A word of warning though; if
you just setup your cache and fail to configure your caching headers correctly,
it's quite possible to end up paying twice for every request.&lt;/p&gt;
&lt;figure&gt;&lt;img src="http://www.mobify.com/static/blog/2013/04/CDN_basic_diagram.png" alt="Basic CDN Diagram."&gt;&lt;/figure&gt;&lt;figcaption&gt;
    A basic flow of data through a CDN. Your webservers provide content to the CDN
    intermediary servers, which have Points of Presence in various geographic
    regions. Lazy network diagram makers will usually just draw a cloud here.
&lt;/figcaption&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Beyond their intended use for caching, CDNs also have a pleasant side-effect;
provided you're dealing with a website, or a particularly well-crafted web
application, in the event that your servers experience a momentary outage, your
CDN may be able to buffer the experience for your end users, ensuring they
never even notice.&lt;/p&gt;
&lt;h3&gt;The Basic Headers&lt;/h3&gt;
&lt;p&gt;So, you know what a CDN is, and you know you want to configure your response
headers to make use of them. Most web servers make it trivial to set response
headers, so I'll leave it to you, Google, and the man pages to figure that part
out. For now, let&amp;#8217;s move onto what headers you should care about.&lt;/p&gt;
&lt;h4&gt;1. cache-control&lt;/h4&gt;
&lt;p&gt;If there were a default super-header for caching behaviour, this would be it.
Typically you will see a string of settings for this header along the lines of:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;cache&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;private&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;These settings are called cache response directives, and are as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;private&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Essentially they let intermediary caches know that a given response is specific
to the end user and should not be cached. Do not make the mistake of assuming
that this in any way provides you with some kind of security or privacy: Keep
using SSL for that.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;When used alone, this guy lets you specify that caches should revalidate this
resource every time, typically using the "etag" header outlined below. The fun
bit comes when you specify a field name after the no-cache directive, which
lets caches know that you can cache the response, provided that the named
fields are stripped out; cookies would be a good example of why you might want
to do this. I should note that older User Agents won't respect this trick, so
you shouldn't depend on it too much.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This guy lets you specify that caches should not store this response. I know
that may be surprising given the name, but there it is. Actually, if the cache
in question is following the rules, it will also ensure that no part of the
request is stored either. "no-store" was designed with sensitive information
requirements in mind, and so is kind of like the G-Man of cache headers.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;max&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Traditionally, you would let caches know when an asset is expired by using the
aptly-named "expires" header, discussed below. However, if you want to be more
explicit, you may set a max-age, in seconds, which will override the expires
header. Further reasons to use this directive are discussed below under the
Caveats section.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;maxage&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Using our keen deductive skills, we can see some similarities between this
header and the last one. "s-" is for shared, as in "shared cache", as in CDN.
These directives are explicitly for CDNs and other intermediary caches. When
present, this directive overrides both the max-age and expires header, and most
well behaved CDNs will obey it.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;must&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;revalidate&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This one is fun, although not applicable to most of us. For the sake of
completeness, and in case your dev-team has some kind of trivia night where
free beer is involved, we'll discuss it. Essentially, if your responses include
this directive, you are telling the cache that it needs to revalidate a cached
asset on any subsequent request, and that it may not, under any circumstance,
serve stale content (which is sometimes a desired behaviour). Of course, I say
"under any circumstances", but what I really mean is that there's a big fat
asterisk next to that claim. If your users are under "severe connectivity
constraints", (perhaps they are browsing from low-earth-orbit), then their user
agents may serve stale content, provided they pinky-swear to tell their users
that they've done so. Apparently this directive exists because some protocols
require it, typically involving transactions.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;transform&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&amp;#8220;Transform into what?&amp;#8221;, you&amp;#8217;re surely asking. Some proxies will convert image
formats and other documents to improve performance. Presumably this was thought
to be a feature that you should have to opt out of. If you don&amp;#8217;t like the idea
of your CDN making automated guesses about how your content should be encoded
or formatted, I suggest including this header.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;proxy&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;revalidate&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Essentially the same as the "must-revalidate" directive, except it's just for
the shared caches. Why didn't they call it "s-mustrevalidate"? I'm sure there
exists a mailing list somewhere where you could find that debate, but for now,
just know that like "s-maxage", this directive is designed for intermediary
proxies and not user agents. The idea here is that you validate each end-user
only once between the proxy and their agent, but each new user should
revalidate back to the server. I suspect if your service requires this feature,
you probably already know about it.&lt;/p&gt;
&lt;p&gt;As always, you should check out the &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9"&gt;spec&lt;/a&gt;
for these settings if you need any clarification.&lt;/p&gt;
&lt;h4&gt;2. expires&lt;/h4&gt;
&lt;p&gt;Back in the day, this was the standard way to specify when an asset expired,
and is just a basic date-time stamp. It is still fairly useful for older user
agents, which cryptowebologists assure us still roam in the uncharted
territories. On most modern systems, the "cache-control" headers "max-age" and
"s-maxage" will take precedence, but it's always good practice to set a
matching value here for compatibility. Just make sure you format the date
correctly, or it will be evaluated as an expired date:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;Thu&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mo"&gt;01&lt;/span&gt; &lt;span class="n"&gt;Dec&lt;/span&gt; &lt;span class="mi"&gt;1983&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mo"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mo"&gt;00&lt;/span&gt; &lt;span class="n"&gt;GMT&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Try to avoid setting the value to more than one year out as that breaks the
specification, (see below for a discussion on cache time settings).&lt;/p&gt;
&lt;h4&gt;3. etag&lt;/h4&gt;
&lt;p&gt;Short for "entity-tag", the etag is a unique identifier for the resource being
requested, typically comprised of the hash of that resource, or a hash of the
timestamp the resource was updated. Basically, this lets a client ask smarter
questions of the CDNs, like "give me X if it's different than the etag I
already have."&lt;/p&gt;
&lt;p&gt;There's a neat trick you can do with etags, which is to make them weak
validators. This basically tells the user that although they are not the same,
the two resources are functionally equivalent. Support for this feature is
considered optional though, so you will want to do some testing with your
providers, (discussed below).&lt;/p&gt;
&lt;h4&gt;4. vary&lt;/h4&gt;
&lt;p&gt;Oh wow. This one is fun. The &amp;#8220;vary&amp;#8221; header is extremely powerful, but can trip
up what would otherwise be a simple caching scheme. IE has had issues handling
the "vary" header &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx"&gt;
in the past&lt;/a&gt;, and at one point, even Chrome was handling this in a &lt;a href="https://code.google.com/p/chromium/issues/detail?id=94369"&gt;funny
way&lt;/a&gt;. Essentially, "vary" lets the caches know which of the headers to use
to figure out if they have a valid cache for a request; if a cache were a
giant key-value store, adding "vary" fields appends those values to the key,
thus changing which requests are considered valid matches for what exists in
the cache.&lt;/p&gt;
&lt;p&gt;You would commonly set this to something like "Accept-Encoding" to make sure
your gzip'ed assets get served where appropriate, saving you all that bandwidth
you might otherwise waste. Additionally, setting:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;vary&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Agent&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;will put you in the SEO good-books if you happen to be serving different
versions of your HTML/CSS depending on the User-Agent of the request. Google
will note the header and have the Googlebot crawl your mobile content as well.&lt;/p&gt;
&lt;h4&gt;5. pragma&lt;/h4&gt;
&lt;p&gt;Another beast from the days of yore, the "pragma" header does many things, and
most of them are honoured by newer implementations. The directive we're most
concerned with is:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;pragma&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;which gets interpreted by newer implementations as:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;cache&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I would not generally recommend worrying about it, but for the sake of
completeness, there it is. No new HTTP directives will be defined for "pragma"
going forward.&lt;/p&gt;
&lt;h3&gt;Some Caveats&lt;/h3&gt;
&lt;p&gt;Now that we've gotten some of the standard and expected behaviours out of the
way, we should probably mention that not every CDN or User Agent will behave
according to the specification, which I'm sure is not news to anyone familiar
with browser compatibility issues. For this reason, it is a good idea to test
your services before launching a live resource to make sure the behaviour you
get is what you expected; it will save you money.&lt;/p&gt;
&lt;p&gt;Also, you may have noted that a lot of the headers seem to be either duplicated
or overlapping. Some of this is because there are subtle differences between
the different methods, and also because the web is shifting over from HTTP/1.0
to HTTP/1.1, which uses the "cache-control" much more heavily. Generally it is
safe to set both and let the CDNs and User Agents figure out which one they
care to listen to.&lt;/p&gt;
&lt;h4&gt;1. Compression&lt;/h4&gt;
&lt;p&gt;Remember that "Accept-Encoding" example for the "vary" header we talked about?
That's your new best friend if you intend to serve compressed content, which I
hope you do to increase performance and save on bandwidth. CDN providers that
get a request with "gzip" as an accepted encoding are expected to request the
compressed asset from the origin server, or to serve a cached version of that
compressed asset. Historically, this has been a sticking point for some CDNs,
and for people wishing to use something like S3 to serve their files, although
modern CDNs are able to perform the compression operation themselves if need
be.&lt;/p&gt;
&lt;p&gt;Things to watch out for when the CDN serves compressed assets is that they'll
often ensure that both uncompressed (AKA identity) and gzip'ed version are in
their cache, regardless of which was requested. There is a time delay as they
perform that operation, so any testing you do will have to take that delay into
account.&lt;/p&gt;
&lt;h4&gt;2. SSL&lt;/h4&gt;
&lt;p&gt;A CDN is basically a Man-In-The-Middle, meaning you need to think about your
HTTPS traffic and how it gets back to your server. Many CDNs will pipe a
request for &lt;code&gt;https://somesite.com/asset&lt;/code&gt; to your servers as
&lt;code&gt;http://somesite.com/asset&lt;/code&gt;, so if your server logic depended on that being
SSL, either reconsider your logic or ask your CDN to redirect to an HTTPS
origin URL. Most CDNs are capable of doing so, with varying degrees of
flexibility.&lt;/p&gt;
&lt;h3&gt;But What about Dynamic Content?&lt;/h3&gt;
&lt;p&gt;Generally the rule of thumb for dynamic content, like the HTML files of a
WordPress blog, is to set &amp;#8220;cache-control: no-cache&amp;#8221; and prevent the CDNs or
User Agents from storing the asset. For most applications, serving your own
dynamic content is probably fine, however if you need to boost performance,
read on.&lt;/p&gt;
&lt;figure&gt;&lt;strong&gt;Typical Dynamic Content&lt;/strong&gt;
    &lt;pre&gt;HTTP/1.1 200 OK
Server: Apache
X-Rack-Cache: miss
ETag: "e6811cdbcedf972c5e8105a89f637d39-gzip"
Status: 200
Content-Type: text/html; charset=utf-8
Expires: Mon, 29 Apr 2013 21:44:55 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Mon, 29 Apr 2013 21:44:55 GMT&lt;/pre&gt;
&lt;/figure&gt;&lt;figcaption&gt;
    An example of a section of a header for dynamic content. Note the missed cache status, and
    the cache-control directives all set to 0 seconds.
&lt;/figcaption&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Most dynamic content has a shelf-life and is not nearly as volatile as we
assume. Things like "Active Users" are probably valid for 10 or 20 seconds,
depending on your site. Dashboards that report daily figures could certainly
stand to be cached for a few minutes. News feeds could certainly stand to be
cached for a while, especially if you remember to set an "etag". If your site
is seeing lots of load, it may be worth trying out a short cache on your
dynamic assets.&lt;/p&gt;
&lt;h4&gt;An Analysis of Cache Time&lt;/h4&gt;
&lt;p&gt;So what types of cache times should you consider setting? Again, this will
require you to consider things like the rate of traffic to your site, how
sizeable your assets are, and how large your cache is, (yes, there are space
allocations, so don't go over them).&lt;/p&gt;
&lt;p&gt;Additionally, you should consider the main tradeoff: speed and performance vs.
control. If you want to update an asset and need the new version to be live
immediately, you may run into trouble if you thought a one-year cache time was
a good idea, especially if you set that for Users (max-age) and not just CDNs
(s-maxage).&lt;/p&gt;
&lt;p&gt;The longest you can set your headers and still be following the specification
is one year, or 31536000 seconds, but this is &lt;em&gt;not a very good idea&lt;/em&gt;. That's
like getting a face tattoo; it stays around forever, barring expensive or
painful removal surgery, which accurately describes the annoyances of having to
trick caches into refetching an asset through name changes or hoping you
remembered to correctly set your etag and that your users and CDNs implemented
them correctly. If your servers can't stand to have your CDNs ask once a day if
your profile picture has changed you should upgrade your servers.&lt;/p&gt;
&lt;figure&gt;&lt;strong&gt;Sane Static Content Headers&lt;/strong&gt;
    &lt;pre&gt;HTTP/1.1 200 OK
Cache-Control: no-transform,public,max-age=300,s-maxage=900
Content-Type: text/html; charset=UTF-8
Date: Mon, 29 Apr 2013 16:38:15 GMT
ETag: "bbea5db7e1785119a7f94fdd504c546e"
Last-Modified: Sat, 27 Apr 2013 00:44:54 GMT
Server: AmazonS3
Vary: Accept-Encoding
X-Cache: HIT&lt;/pre&gt;
&lt;/figure&gt;&lt;figcaption&gt;
    A sample of cache settings for a static asset served from S3. Here we see that
    the cache has been asked to store the asset for 900 seconds rather than the 300
    seconds set for User Agents. Also note the "x-cache: HIT" header, indicating
    the CDN served the request.
&lt;/figcaption&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;There is one exception to the &amp;#8220;thou-shalt-not-set-one-year-headers&amp;#8221;
commandment, or more accurately, there&amp;#8217;s a bit of a hack to get around their
pitfalls: if you&amp;#8217;ve configured your site to generate resource names, you can
rename your assets each time you publish a new version. Typically, this will
involve an incrementing version number, a date-time stamp, or a hash of the
contents, much like an &amp;#8220;etag&amp;#8221;, being appended to the file name, so that you end
up with things like &amp;#8220;core.E89A123FFDB...432D687B.css&amp;#8221; and the like. It&amp;#8217;s not
pretty, but really, who cares? Also, this lets you set one-year-headers without
worrying about updating your resources.&lt;/p&gt;
&lt;p&gt;A handy table best explains the cache time trade-off. Assuming a web asset get
500 requests per minute, then the following Hit Ratios are possible for each
cache time:&lt;/p&gt;
&lt;table&gt;&lt;tr&gt;&lt;th&gt;Cache time (minutes)&lt;/th&gt;
        &lt;th&gt;Hit Ratio&lt;/th&gt;
        &lt;th&gt;Request to Origin / Hr&lt;/th&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;
        &lt;td&gt;99.8%&lt;/td&gt;
        &lt;td&gt;60&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;
        &lt;td&gt;99.96%&lt;/td&gt;
        &lt;td&gt;12&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;20&lt;/td&gt;
        &lt;td&gt;99.99%&lt;/td&gt;
        &lt;td&gt;3&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;60&lt;/td&gt;
        &lt;td&gt;99.997%&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
    &lt;/tr&gt;&lt;tr&gt;&lt;td&gt;86400&lt;/td&gt;
        &lt;td&gt;99.9998%&lt;/td&gt;
        &lt;td&gt;&amp;lt;1&lt;/td&gt;
    &lt;/tr&gt;&lt;/table&gt;&lt;p&gt;There. It's spelt out. What kind of Hit Ratio do you need? Typically 60 seconds
to an hour is an ideal trade-off. For pseudo-dynamic content, you can still use
CDNs, just start working in the under-60-seconds range, as appropriate for the
request.&lt;/p&gt;
&lt;h3&gt;Testing Your CDN&lt;/h3&gt;
&lt;p&gt;So, onto the testing. Always check that the headers are coming through CDNs the
way you expect when setting up new services. Typically a CDN will insert some
kind of "x-" header to indicate that it hit, missed, or served expired content.
What we're looking for is a convenient way to look at this and other headers,
and to set them on our requests for testing. There are more than a few tools
out  there to help, though these are the ones I&amp;#8217;ve found most handy.&lt;/p&gt;
&lt;h4&gt;1. &lt;a href="https://www.google.com/intl/en/chrome/browser/"&gt;Web Inspector&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Probably the most accessible method, simply right-click on a webpage in Chrome,
click Inspect Element, navigate to the Network tab, hit refresh, and click on
the HTML asset at the top. If it's not selected by default, checkout the
Headers tab to see all your request and response headers. Chrome also lets you
set the user agent you request with, and gives you the option to not use your
local cache, which is handy when you're testing.&lt;/p&gt;
&lt;h4&gt;2. &lt;a href="http://www.charlesproxy.com/"&gt;Charles Proxy et al.&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Tools like Charles Proxy will let you route traffic through them and manipulate
DNS lookups, record headers, and see performance statistics, all in a clean,
easy-to-use GUI. These tools are generally more task-specific than the Web
Inspector and other browser tools, and generally worth the small licensing fee
if you work with web requests in any significant way.&lt;/p&gt;
&lt;h4&gt;3. &lt;a href="http://curl.haxx.se/"&gt;cURL&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Quick, easy, and highly flexible, cURL lets you make web requests directly from
the command line and check out the responding headers. Helpful flags include
&lt;em&gt;-A&lt;/em&gt; for user agents, &lt;em&gt;-b&lt;/em&gt; for cookies, &lt;em&gt;-F&lt;/em&gt; for form data, &lt;em&gt;-H&lt;/em&gt; for setting
headers, and &lt;em&gt;-I&lt;/em&gt; to request the header only. Very handy for sanity checks, and
extremely powerful.&lt;/p&gt;
&lt;h4&gt;4. &lt;a href="http://hurl.it"&gt;hurl.it&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;hurl.it is essentially cURL with a prettier interface, and in a webbrowser.
You&amp;#8217;re able to set the headers you pass in to the request, as well as view the
full header and body response. Although you don&amp;#8217;t quite get the robustness of
the command line, it&amp;#8217;s still very useful for a quick header examination, and is
probably the fastest way to get access to headers if you&amp;#8217;re in a hurry.&lt;/p&gt;
&lt;h4&gt;5. &lt;a href="http://docs.python-requests.org/en/latest/"&gt;Python and Requests&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Requests is a great Python package for making web requests, and is useful for
quick checks from the REPL, or from slightly more complex scripted checks.
Using Requests comes with the added benefit of letting you write a test-suite
for your web assets to assert the status of response headers.&lt;/p&gt;
&lt;h3&gt;Notes from the Field and Parting Thoughts&lt;/h3&gt;
&lt;p&gt;So now you&amp;#8217;ve made it all the way through our quick guide to cache headers, and
you&amp;#8217;re eager to get going on setting your own. Excellent. However, now it&amp;#8217;s
time to put some of this in perspective.&lt;/p&gt;
&lt;p&gt;Most web servers, like Apache and Nginx, will do a lot of this work for you.
Really, the &amp;#8220;cache-control&amp;#8221; header is the only one you&amp;#8217;re going to have to work
with. Web browsers are typically set up to cache aggressively to improve user
experience, so often you&amp;#8217;ll be fighting to prevent caching rather than ensuring
it. Generally this means that you set a &amp;#8220;/static&amp;#8221; path and configure its
caching headers to allow caching up to some reasonable interval like 300
seconds. Next, you would ensure that your root path &amp;#8220;/&amp;#8221; has &amp;#8220;cache-control:
no-cache&amp;#8221; enabled, or better yet route dynamic content straight to your servers
and only have &amp;#8220;/static&amp;#8221; use your CDN. This is a healthy starting point for most
purposes. If your hosting bill is astronomical, or you get to use operations
cost savings as beer money, then consider tweaking your settings.&lt;/p&gt;
&lt;p&gt;CDNs will often give you the option of breaking protocol and will cache for
whatever period you like, regardless of the headers. They also take liberties
with the protocols depending on their interpretation of expected behaviour,
which is why it&amp;#8217;s important to test the headers you get out of your CDN and
compare them to your servers. Consider the expected behaviour outlined here to
be a baseline and keep an eye out for variance.&lt;/p&gt;
&lt;p&gt;Good luck, and happy caching!&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;&lt;em&gt;For more tips and tricks on improving latency checkout our analysis of &lt;a href="http://www.mobify.com/blog/web-performance-optimization/"&gt;Mobile Web Performance&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Mobile Web Design for Content-Heavy Websites: 8 Clever Techniques from Golf Digest</title><link href="http://www.mobify.com/blog/mobile-web-design-for-content-heavy-websites/" rel="alternate"></link><updated>2013-04-17T16:05:00-07:00</updated><author><name>David Fay</name></author><id>tag:www.mobify.com,2013-04-17:blog/mobile-web-design-for-content-heavy-websites/</id><summary type="html">&lt;div&gt;&lt;p&gt;Adapting a content-heavy website for mobile devices can seem like a difficult
design challenge. How do you successfully squeeze all of that valuable content
into such a small viewport?&lt;/p&gt;
&lt;p&gt;Many publishers are choosing to ignore this challenge, happy to let users pinch,
zoom and squint their way around a website. And if the content&amp;#8212;for
example, an image gallery&amp;#8212;fails to work at all, &lt;em&gt;it's the user's fault for
browsing on a smartphone&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Other publishers, however, do not feel the same way.&lt;/p&gt;


&lt;p&gt;Golf Digest is a monthly golf magazine published by one of the world's leading
publishers, Cond&amp;#233; Nast. The property has 6.3 million monthly print subscribers
and over 1 million unique visitors to the website each month. It's kind of a big
deal in the golfing world.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.golfdigest.com/"&gt;GolfDigest.com&lt;/a&gt; is a great place to go for getting
up to date with the latest news, cutting-edge equipment and in-depth golfing
stories. It's also a fantastic resource for improving your game on the go&amp;#8212;
featuring video tips, image galleries and articles by some of the world&amp;#8217;s leading
golfers.&lt;/p&gt;
&lt;p&gt;As it turns out, GolfDigest.com is also a solid example of &lt;strong&gt;how to design a
brilliant, content-heavy website for mobile devices&lt;/strong&gt;. The Golf Digest
development team has launched a full-featured mobile destination for their
readers and the result is a fast and attractive companion website for any golfer
on the go.&lt;/p&gt;
&lt;p&gt;Why is the mobile website so successful? Below, you'll find 8 mobile web design
best practices found on GolfDigest.com that create such a rich mobile
experience.&lt;/p&gt;
&lt;h3&gt;1. Hint and reveal with progressive disclosure&lt;/h3&gt;
&lt;p&gt;Mobile devices are small and websites tend to present a lot of information.
Readers can easily experience information overload when there are too many
details displayed on their small screens. Progressive disclosure hints at
content beyond the frame of the device, and then reveals that content when the
user swipes, taps or scrolls to access it.&lt;/p&gt;
&lt;p&gt;By using progressive disclosure, you'll showcase the important parts of the
page&amp;#8212;your valuable content&amp;#8212;while at the same time highlighting
actions available to users.&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_01.png" alt="Progressive disclosure on the Golf Digest mobile menu"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        Golf Digest hides the site navigation to simplify the header on mobile
        devices. A quick tap is all it takes to reveal the navigation and move to
        the next section.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;2. Ads don&amp;#8217;t have to be a nuisance on mobile&lt;/h3&gt;
&lt;p&gt;Ads that are poorly integrated on mobile devices can be a user experience
disaster waiting to happen. To avoid this scenario, you need to think about how
users navigate your website and make sure that your ad system doesn't ruin the
user journey. This is especially true if you're serving up in-depth, high-value
content that users might want to focus on.&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_02.png" alt="Ad integration on GolfDigest.com"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        The Golf Digest mobile website is a great example of how to elegantly
        integrate your existing ad system into a content-heavy website without
        breaking the mobile user experience.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;3. Carousels make the world go 'round&lt;/h3&gt;
&lt;p&gt;Carousels are user interface elements that show additional content when a user
swipes horizontally. They provide an excellent way to showcase images and
highlight featured content.&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_03.png" alt="Carousel on Golf Digest"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        Golf Digest has a large image carousel in the header of the homepage.
        Readers can swipe between stories to browse the most relevant new content
        for their interests.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;4. Sticky navigation speeds up browsing&lt;/h3&gt;
&lt;p&gt;Sticky navigation refers to navigation that remains in place no matter what part
of the page is being viewed. Recent studies have shown that users really
appreciate the accessibility of sticky navigation, as it can make browsing a
site &lt;a href="http://uxdesign.smashingmagazine.com/2012/09/11/sticky-menus-are-quicker-to-navigate/"&gt;up to 22% faster&lt;/a&gt;.
Smartphone audiences typically move through websites quickly, so a sticky
navigation can be a particularly useful feature.&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_04.png" alt="Sticky navigation on Golf Digest's website"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        GolfDigest.com provides users with a sticky navigation that makes it easy for
        them to get to their next destination. In sections of the website where users
        need to quickly jump between written, video or image-based lessons, providing a
        persistent way to navigate is an excellent design choice.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;5. Large touch targets = a UX hole in one&lt;/h3&gt;
&lt;p&gt;While it seems counterintuitive to make everything bigger on a device with a
limited screen size, in reality none of us are as dexterous as we&amp;#8217;d like to be
on mobile devices. Unfortunately, our fleshy fingers are much less precise than
the pin-point click of a mouse.&lt;/p&gt;
&lt;p&gt;With this in mind, make your website's touch targets &lt;em&gt;big&lt;/em&gt;. We recommend at
least 40px by 40px on smartphones with a 10px margin around the targets.&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_05.png" alt="Large touch targets on Golf Digest"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        Each of the content links on GolfDigest.com are large and easy to tap,
        whether you're casually browsing on the couch or quickly sneaking in a few
        quick tips on the course.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;6. Forget the desktop and augment your content for mobile&lt;/h3&gt;
&lt;p&gt;On mobile, simple tends to beat pretty. Simple also tends to &lt;em&gt;be&lt;/em&gt; pretty, so
that helps too! Take a moment to look at your website&amp;#8217;s content on a mobile
device. Is the information communicated effectively? Does the existing design
augment or distract from the message?&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_06.png" alt="Mobile image gallery on GolfDigest.com"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        GolfDigest.com features a compelling image gallery that leaves behind the
        desktop design to focus on solving the gallery design challenge on mobile.

        To maximize the space allocated to images, extra information about each slide is
        hidden in a drawer underneath. Users can also get additional information about
        the parent article by clicking the 'i' in the upper left corner, while the 'x'
        in the upper right corner brings users back to the page that you came from (a
        clever use of the browser's history API).
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;7. Be lazy! Let the OS do all the work&lt;/h3&gt;
&lt;p&gt;Creating design elements that look pretty across all screen sizes, browsers and
breakpoints can be a total pain. For DOM elements such as dropdowns, radio
buttons and sliders, you can easily draw upon existing native UI elements
without having to worry about styling your own. These native elements have large
touch targets and look great on any device.&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_07.png" alt="native iOS elements on Golf Digest's mobile website"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        Golf Digest provides a fallback to native OS elements in their dropdown
        menus.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;8. Adapt for portrait and landscape viewing&lt;/h3&gt;
&lt;p&gt;The majority of mobile devices can be used in a portrait or landscape
orientation, so websites need to be responsive to the orientation the device is
in. Pages should adjust using a fluid grid layout when a customer switches from
holding their phone in portrait mode to landscape mode (or vice versa).&lt;/p&gt;
&lt;figure&gt;&lt;div class="image-centered"&gt;
        &lt;img src="http://www.mobify.com/static/blog/2013/04/img_08.png" alt="Golf Digest in portrait and landscape view"&gt;&lt;/div&gt;
    &lt;figcaption&gt;
        Golf Digest's flexible grid-layout adapts the content to different sized phones
        and orientation changes.
    &lt;/figcaption&gt;&lt;/figure&gt;&lt;h3&gt;The Bottom Line&lt;/h3&gt;
&lt;p&gt;People visit your website to interact with the content that's there (duh!). But
hosting great content only half the battle&amp;#8212;showcasing it in a device-
appropriate design is also extremely important. Whether users visit your website
to learn, read, browse, shop, listen or watch&amp;#8212;they expect your content to
be accessible and digestible on any device.&lt;/p&gt;
&lt;p&gt;Put your users first and take steps to optimize the design of your content.
They'll thank you with their time, money and loyalty!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do you have a favourite publication that provides a great experience on mobile? Let us know in the comments!&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;&lt;em&gt;GolfDigest.com was built by the Golf Digest in-house development team using Mobify.js, our open source JavaScript library. If you'd like to launch a mobile website as awesome as GolfDigest.com, feel free to check out the &lt;a href="http://www.mobify.com/mobifyjs/"&gt;Mobify.js developer documentation&lt;/a&gt; to get started!&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Red state, blue state 2012: iOS vs Android in the USA</title><link href="http://www.mobify.com/blog/ios-vs-android-in-2012/" rel="alternate"></link><updated>2013-03-21T16:05:00-07:00</updated><author><name>Philip Webb</name></author><id>tag:www.mobify.com,2013-03-21:blog/ios-vs-android-in-2012/</id><summary type="html">&lt;div&gt;&lt;p&gt;When it comes to politics, the US loves dividing up the country according to
political parties. But who is winning the battle of the mobile operating system?&lt;/p&gt;
&lt;p&gt;In this article, we&amp;#8217;ve broken down mobile website traffic in the US according
to mobile OS. Our sample data comes from Mobify's publisher network, which is
composed of over &lt;strong&gt;20,000 sites&lt;/strong&gt; with almost &lt;strong&gt;200 million visits&lt;/strong&gt; in 2012.&lt;/p&gt;


&lt;p&gt;Why are we only featuring iOS and Android? Simple &amp;#8212; when combined the two mobile
operating systems made up a whopping 93% of all mobile page views in 2012. The
next mobile operating system on the list was Blackberry OS, with a 4% share of
mobile web traffic.&lt;/p&gt;
&lt;h3&gt;Results&lt;/h3&gt;
&lt;p&gt;To view the dominant operating system in your state, check out our interactive
chart below. The more red the state, the higher the percentage of
Android mobile page views in 2012. The more blue the state, the higher the
percentage of iOS views. States close to 50 / 50 will be a shade of purple.&lt;/p&gt;
&lt;div id="chart_div" style="width: 100%; height: auto;"&gt;&lt;/div&gt;

&lt;div&gt;
    &lt;!-- https://gist.github.com/johnboxall/b739e3359f436fa39b5b/raw/08e49b7daba59679956ba3cdaa4bd8280c0a8f63/gistfile1.html --&gt;
    &lt;script src="http://www.google.com/jsapi"&gt;&lt;/script&gt;&lt;script&gt;
    (function() {
        var drawRegionsMap = function() {
            var data = google.visualization.arrayToDataTable([
                ['State', '% iOS', 'Android'],
                ['Alabama', 38, 62],
                ['Alaska', 63, 37],
                ['Arizona', 37, 63],
                ['Arkansas', 65, 35],
                ['California', 48, 52],
                ['Colorado', 44, 56],
                ['Connecticut', 58, 42],
                ['Delaware', 49, 51],
                ['District of Columbia', 39, 61],
                ['Florida', 46, 54],
                ['Georgia', 38, 62],
                ['Hawaii', 68, 32],
                ['Idaho', 54, 46],
                ['Illinois', 38, 62],
                ['Indiana', 57, 43],
                ['Iowa', 44, 56],
                ['Kansas', 43, 57],
                ['Kentucky', 56, 44],
                ['Louisiana', 64, 36],
                ['Maine', 58, 42],
                ['Maryland', 53, 47],
                ['Massachusetts', 60, 40],
                ['Michigan', 35, 65],
                ['Minnesota', 37, 63],
                ['Mississippi', 57, 43],
                ['Missouri', 46, 54],
                ['Montana', 67, 33],
                ['Nebraska', 30, 70],
                ['Nevada', 52, 48],
                ['New Hampshire', 51, 49],
                ['New Jersey', 56, 44],
                ['New Mexico', 58, 42],
                ['New York', 58, 42],
                ['North Carolina', 35, 65],
                ['North Dakota', 58, 42],
                ['Ohio', 45, 55],
                ['Oklahoma', 64, 36],
                ['Oregon', 57, 43],
                ['Pennsylvania', 51, 49],
                ['Rhode Island', 61, 39],
                ['South Carolina', 40, 60],
                ['South Dakota', 70, 30],
                ['Tennessee', 61, 39],
                ['Texas', 39, 61],
                ['Utah', 58, 42],
                ['Vermont', 67, 33],
                ['Virginia', 49, 51],
                ['Washington', 42, 58],
                ['West Virginia', 68, 32],
                ['Wisconsin', 33, 67],
                ['Wyoming', 36, 64]
            ]);

            var options = {
                region: 'US',
                resolution: 'provinces',
                backgroundColor: 'white',
                colors: ['red', 'blue']
            };

            var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
            chart.draw(data, options);
        };

        google.load('visualization', '1', {'packages': ['geochart']});
        google.setOnLoadCallback(drawRegionsMap);
    })();
    &lt;/script&gt;&lt;/div&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;The eagle eyed observer will notice that the biggest difference between iOS
and Android exists in South Dakota and Nebraska. Nebraska has
70% Android penetration, while South Dakota has a stronger iOS penetration &amp;#8211;
also at 70%. Pennsylvania, New Hampshire, and Virginia are all split evenly
at approximately 50 / 50.&lt;/p&gt;
&lt;h3&gt;What does this mean for your mobile strategy?&lt;/h3&gt;
&lt;p&gt;Since 93% of traffic on the mobile web in 2012 was generated by iOS and Android,
focusing on these mobile operating systems is going to be key to a successful
mobile strategy.&lt;/p&gt;
&lt;p&gt;When launching a mobile website, be sure to spend the extra time testing on
the major browsers that run on Android and iOS like Mobile Safari, Chrome,
Opera and Firefox.&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;&lt;em&gt;This post focused on the breakdown of mobile web traffic in 2012 according to
mobile operating system.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you're looking for a breakdown of web traffic according to device, feel
free to check out our previous article, &lt;a href="http://www.mobify.com/blog/what-devices-dominated-the-mobile-web-in-2012/"&gt;Which devices dominated the mobile
web in 2012&lt;/a&gt;?&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Evolving Mobify part 5: HTTP Basic Authentication</title><link href="http://www.mobify.com/blog/evolving-mobify-4-http-auth/" rel="alternate"></link><updated>2013-03-13T11:22:00-07:00</updated><author><name>Philip Webb</name></author><id>tag:www.mobify.com,2013-03-13:blog/evolving-mobify-4-http-auth/</id><summary type="html">&lt;div&gt;&lt;p&gt;Today we&amp;#8217;re happy to announce the latest in Mobify&amp;#8217;s biweekly update cycle!&lt;/p&gt;
&lt;p&gt;This round&amp;#8217;s update consists of one feature: adding support for HTTP Basic authentication. Why only 1 feature this time? We&amp;#8217;re working hard behind the scenes on some major new features that will be released soon!&lt;/p&gt;


&lt;p&gt;&lt;strong&gt; HTTP Basic Authentication &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Basic_access_authentication"&gt;HTTP Basic authentication&lt;/a&gt; is a method for a browser to provide a user name and password when making a request &amp;#8212; you&amp;#8217;ve probably seen sites where a built-in browser dialog box pops up and asks for a username and password.&lt;/p&gt;
&lt;p&gt;Now you can use Mobify to take your site mobile, even if your site is protected by basic authentication.&lt;/p&gt;
&lt;p&gt;To use Mobify and HTTP Basic authentication, type the following string into the &lt;em&gt;URL&lt;/em&gt; field in the Mobile Site Settings in &lt;a href="https://cloud.mobify.com"&gt;Mobify Cloud&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://USERNAME:PASSWORD@www.site.com/path.html&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Where&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;USERNAME = your username&lt;/li&gt;
    &lt;li&gt;PASSWORD = your password&lt;/li&gt;
    &lt;li&gt;www.site.com = the URL of your site &lt;/li&gt;
&lt;/ul&gt;&lt;div class="image-700x230"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/http-basic-auth.png" alt="Alt text"&gt;&lt;/div&gt;

&lt;p&gt;This feature is particularly useful for those of you who have staging environments protected by HTTP Basic authentication. It&amp;#8217;s important to note that you won't see a password dialog in Mobify Studio or when you click Preview, but users on your production site will still be prompted.&lt;/p&gt;
&lt;p&gt;This is already live on all Mobify accounts &amp;#8212; log into &lt;a href="https://cloud.mobify.com"&gt;cloud.mobify.com&lt;/a&gt; and try it out yourself. If you haven't played with Mobify in a while, a lot has changed &amp;#8212; now's a great time to see what we&amp;#8217;ve been up to!&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;d like to see a live demo of Mobify features in action, &lt;a href="http://www.mobify.com/go/webinar-registration/"&gt;register for our biweekly webinar&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;More on previous updates to Mobify are &lt;a href="http://www.mobify.com/blog/tag/mobify-studio-updates/"&gt;available here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you have any questions or feedback, email us at &lt;strong&gt;support at mobify.com&lt;/strong&gt; and we&amp;#8217;ll get right back to you!&lt;/p&gt;&lt;/div&gt;</summary><category term="evolving-mobify"></category><category term="mobify-studio-updates"></category><category term="updates"></category></entry><entry><title>4 Real-World Business Impacts of a Responsive Design Approach</title><link href="http://www.mobify.com/customer-exclusive/4-real-world-business-impacts-of-a-responsive-design-approach/" rel="alternate"></link><updated>2013-03-13T10:00:00-07:00</updated><author><name>David Fay</name></author><id>tag:www.mobify.com,2013-03-13:customer-exclusive/4-real-world-business-impacts-of-a-responsive-design-approach/</id><summary type="html">&lt;div&gt;&lt;p&gt;Responsive design is quickly gaining recognition as the dominant approach to building new websites. With good reason, too: a responsive design workflow is a fantastic way to build tailored web experiences for different screen sizes and resolutions.&lt;/p&gt;
&lt;p&gt;However, going responsive comes with its own set of difficulties. In this article we highlight the four main challenges of a responsive design approach, and address the business impact of each challenge. If you're thinking about going responsive, here are some critical facts you should know in advance!&lt;/p&gt;
&lt;h3&gt;Responsive Performance&lt;/h3&gt;
&lt;p&gt;A website is considered 'responsive' when it dynamically changes its layout based on the screen size of the device that loads it. The properties that control these changes are written into your website's HTML, CSS and JavaScript. &lt;/p&gt;
&lt;p&gt;In a responsive design, each time a page loads on mobile it is also loading instructions for how to look on desktops and tablets. Every time a user visits your site they download the full page content by default &amp;#8211; no matter which device they are using. &lt;/p&gt;
&lt;p&gt;We conducted an analysis into 15 top responsive e-commerce sites which revealed that the average responsive site home page consists of &lt;strong&gt;87.2 resources&lt;/strong&gt; and is made up of &lt;strong&gt;1.9 MB of data&lt;/strong&gt;. If 87 resources seems like a lot, it is. The reason the number is so high is because together they dictate how the web page should render on all desktop, smartphone and tablet devices. &lt;/p&gt;
&lt;p&gt;However, since your customer is only using one device at a time to access your website, they have to wait for these resources to download before the page becomes usable on their device. &lt;/p&gt;
&lt;p&gt;It almost goes without saying: we all hate waiting for websites to load. When your customers are forced to wait, the result is a drop in conversion rates and user satisfaction. On smartphones, the conversion rate &lt;a href="http://www.webperformancetoday.com/2011/11/23/case-study-slow-page-load-mobile-business-metrics/"&gt;drops by an extra 3.5% when users have to wait just one second&lt;/a&gt;. By the 3 second mark, &lt;a href="http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-user-expectations/website-abandonment-happens-after-3-seconds/"&gt;57% of users will have left your site completely&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The best way to speed up performance on your responsive website is to make sure that only the necessary resources are sent to customers&amp;#8217; smartphones, tablets and desktops. For maximum performance, you can also compress and concatenate JavaScript and CSS resources. This can be done manually by your in-house development team with tools such as &lt;a href="http://sass-lang.com/"&gt;SASS&lt;/a&gt; for CSS compression and &lt;a href="https://github.com/mishoo/UglifyJS2"&gt;Uglify&lt;/a&gt; for JavaScript compression. You can also use Mobify's own automated JavaScript and CSS acceleration tool.&lt;/p&gt;
&lt;p&gt;By using services like the above, you'll ensure that the number of HTTP requests is dramatically reduced and customers spend less time waiting for pages to become usable.&lt;/p&gt;
&lt;h3&gt;Responsive Images&lt;/h3&gt;
&lt;p&gt;Images pose one of the biggest problems in responsive design. If a responsive design uses one markup across devices, how do you ensure that only big, beautiful images are served to your Retina Macbook Pro, while making sure that an old smartphone is sent smaller images that make sense for its lower-resolution screen? &lt;/p&gt;
&lt;p&gt;The business impact of the image problem is significant. For image-rich websites, page performance on mobile can become significantly degraded, with a similar impact on conversion rates as detailed in the previous section. In addition, the wasted bandwidth of sending weighty images to the wrong devices can cost thousands of dollars a month. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;"To say that a picture is worth a thousand words is really an understatement. In our case, pictures are worth hundreds of millions of dollars. You have to create a new way to load those images dynamically and in real time without affecting the user experience, so having the fastest possible load time is very important to us.&amp;#8221;&lt;/p&gt;
&lt;p&gt;Richard Cohene, &lt;a href="http://www.beyondtherack.com"&gt;Beyond the Rack&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The good news is that there are &lt;a href="http://css-tricks.com/which-responsive-images-solution-should-you-use/"&gt;a number of different solutions to the responsive image problem&lt;/a&gt;. The bad news is that these solutions frequently require you to make significant changes to your existing site, or come with performance challenges of their own.&lt;/p&gt;
&lt;p&gt;At Mobify, we've created a solution that lets you dynamically optimize your images for all screen sizes and resolutions. Using a single JavaScript tag inserted into your HTML, you can deliver responsive images through our global CDN. This means that you can always send the right images to the right devices, and do so at remarkable speeds &amp;#8211; without needing to change your website. &lt;/p&gt;
&lt;div class="image-700x350 image-frame"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/before-optimization.png" alt="Before Mobify Optimization"&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;A responsive e-commerce website, pre-optimization. It loads 136 resources, and is 9.02 MB.&lt;/em&gt;&lt;/p&gt;
&lt;div class="image-700x350 image-frame"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/after-optimization.png" alt="After Mobify Optimization"&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;The same responsive e-commerce website, after script and image optimization. It includes 23 resources and is 581.81 KB, leading to a much faster load time, reduced bandwidth costs and much happier customers.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Responsive Content&lt;/h3&gt;
&lt;p&gt;Going responsive ensures that your existing &amp;#8216;desktop content&amp;#8217; is also available on smartphones and tablets. This is a great approach, because users on these devices expect to have access to the same information across different devices. It also means that every time you update your content, it is automatically reflected across desktops, smartphones, and tablets.&lt;/p&gt;
&lt;p&gt;However, a responsive design often gives designers only two choices for how to present a page's content. They can either: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Load existing &amp;#8216;desktop content&amp;#8217; and show all of it &lt;/li&gt;
&lt;li&gt;Load specific desktop and mobile content and hide one or the other&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The challenge stems from the fact that while mobile users expect to have access to the same content across all devices, they also expect the information to be presented in an easily digestible format. You could show all of your existing content, but that doesn&amp;#8217;t provide a great experience for people reading on smaller screens. It&amp;#8217;s also possible to load both your &amp;#8216;desktop content&amp;#8217; and &amp;#8216;mobile content&amp;#8217; and selectively hide the elements you don&amp;#8217;t need on a particular device, but that just adds to the performance problems detailed above.&lt;/p&gt;
&lt;p&gt;The business impact of this problem varies between industries. If you monetize your website through advertising revenue, a dip in pages per visit due to inferior content layout is bad news for your bottom line. If you have an e-commerce website, a poor mobile user experience could result in reduced mobile conversion rates at all points in your funnel.&lt;/p&gt;
&lt;p&gt;The best solution to the responsive content problem is to try and make your content adaptive. Rather than envisioning a model where you have &amp;#8216;desktop content&amp;#8217; and &amp;#8216;mobile content&amp;#8217;, think about how you can publish content so that it is useful on any platform. &lt;/p&gt;
&lt;p&gt;Sometimes this can mean changing existing content so that it doesn&amp;#8217;t break when viewed in different contexts (e.g. a headline isn&amp;#8217;t clipped on a smartphone screen). Other times it can mean creating additional content, structures and metadata that allow you to &lt;a href="http://www.slideshare.net/KMcGrane/adapting-ourselves-to-adaptive-content-12133365"&gt;create content once and then publish everywhere&lt;/a&gt;. &lt;/p&gt;
&lt;h3&gt;Development Time and Resources&lt;/h3&gt;
&lt;p&gt;One of the most frequently cited problems with responsive design is that it is difficult and expensive to shoehorn an existing website design into a responsive framework. Since you&amp;#8217;re integrating several designs into one markup, it can take several times as long to get a design to market. You have to employ advanced techniques to make sure the design works perfectly on every browser, while also making sure that it will degrade gracefully in older, legacy browsers. &lt;/p&gt;
&lt;p&gt;The business impact is represented by the additional time, QA and resources it takes to make your site responsive. the more expensive the project becomes. &lt;/p&gt;
&lt;p&gt;The trick to implementing a responsive design is to do so in a way that is sustainable and realistic in a world of limited resources (time, people, money). For example, it is generally cheaper and easier to go responsive when rebuilding a site from the ground up, rather than trying to manipulate an existing design.&lt;/p&gt;
&lt;p&gt;Another solution is to forgo a single responsive design in favour of using adaptive templates. Rather than trying to create one design that is responsive to every device type, adaptive templating allows you to break up the design into multiple responsive templates that are targeted to different device screen sizes and resolutions. &lt;/p&gt;
&lt;p&gt;Unlike a single responsive design, you can test and launch adaptive templates without needing to see if one design decision is going to break another part of the design. It&amp;#8217;s a great way of reducing the time, development, and QA cost of going responsive. &lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Here at Mobify, we&amp;#8217;re huge believers in the principles of a responsive (and adaptive) web. The idea that a website should dynamically respond to the device that is accessing it is a core part of our company philosophy, and we&amp;#8217;ve built responsive design best practices into our platform to help websites quickly and easily launch amazing experiences for every screen size and resolution on the market. &lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re thinking of launching a responsive website and would like more information on how to avoid the challenges of a responsive approach, please contact Mobify&amp;#8217;s Director of Customer Success, Ben Terrill. &lt;/p&gt;
&lt;p&gt;&lt;a href="mailto:ben@mobify.com" class="btn btn-medium"&gt;Talk to Ben Today&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>8 Influential Women in the Mobile Web</title><link href="http://www.mobify.com/blog/8-influential-women-in-mobile-web/" rel="alternate"></link><updated>2013-03-08T10:00:00-08:00</updated><author><name>Mike Abasov</name></author><id>tag:www.mobify.com,2013-03-08:blog/8-influential-women-in-mobile-web/</id><summary type="html">&lt;div&gt;&lt;p&gt;Today is International Women's Day and we couldn't resist 
highlighting some of the amazing women working in the mobile Web. &lt;/p&gt;
&lt;p&gt;Some of these women are making the web more adaptive. Others 
educate businesses, designers, and developers on the importance 
of the mobile channel and how to get the most out of it.&lt;/p&gt;


&lt;h3&gt;Mary Meeker, Partner at Kleiner Perkins Caufield Byers&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Twice a year, Mary Meeker of Kleiner Perkins Caufield Byers 
            shares her insights about the current state of the Internet 
            in a presentation called Internet Trends. 
        &lt;/p&gt;
        &lt;p&gt;
            The &lt;a href="http://www.kpcb.com/insights/2012-internet-trends"&gt;Internet Trends presentations&lt;/a&gt; are highly anticipated and 
            provide outstanding insight into global macro trends and factors 
            that influence the Internet economy &amp;#8212; e-commerce, mobile 
            and communications. 
        &lt;/p&gt;
        &lt;p&gt;
            One of Meeker's bravest predictions back in 2008 was that mobile 
            web usage would surpass desktop web usage by 2014. Right up to our 
            latest numbers, her prediction is proving correct.
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/mary-meeker.png" alt="mary-meeker" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Julianne Bowman, Principal Consultant at PA Consulting &lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            With 15 years of experience in UX for online and mobile, 
            Julianne has become a reputable source of insight into 
            product innovation and mass adoption of new technologies.
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href="https://twitter.com/Julsbo"&gt;Follow Julianne on Twitter&lt;/a&gt;
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/julianne-bowman.png" alt="julianne-bowman" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Julie A. Ask, Vice President, Principal Analyst at Forrester&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Julie has worked as an analyst for over 12 years, bridging 
            her technical and business expertise to produce great 
            research reports, such as the recent "&lt;a href="http://www.forrester.com/2013+Mobile+Trends+For+eBusiness+Professionals/fulltext/-/E-RES91241"&gt;2013 Mobile Trends 
            For eBusiness Professionals&lt;/a&gt;" and "&lt;a href="http://www.forrester.com/2013+Mobile+Trends+For+Marketers/fulltext/-/E-RES91661"&gt;2013 Mobile Trends For 
            Marketers&lt;/a&gt;."
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href="http://www.forrester.com/Julie-A.-Ask"&gt;See Julie's profile on Forrester&lt;/a&gt;
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/julie-ask.png" alt="julie-ask" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Lyza Danger Gardner, Co-Founder at Cloud Four&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Lyza has over 15 years of web development experience, 
            both front-end and back-end. She has recently written 
            an authoritative book on mobile development and the 
            impact it has on business, "&lt;a href="http://shop.oreilly.com/product/0636920018100.do"&gt;Head First Mobile Web&lt;/a&gt;."
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href="https://twitter.com/lyzadanger"&gt;Follow Lyza on Twitter&lt;/a&gt;
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/lyza-danger-gardner.png" alt="lyza-danger-gardner" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Stefanie Reiger, Co-Founder at Yiibu&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Stephanie is the co-founder of &lt;a href="http://www.yiibu.com"&gt;Yiibu&lt;/a&gt;, 
            a company that designs and develops elegant, informative and easy 
            to use interactive media experiences for diverse platforms. She also 
            has a strong creative background in corporate communications, marketing 
            and advertising. 
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href="https://twitter.com/stephanierieger"&gt;Follow Stephanie on Twitter&lt;/a&gt;
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/stephanie-rieger.png" alt="stephanie-rieger" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Angela Steele, CEO at Ansible Mobile&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Angela heads up one of the most successful mobile ad companies, 
            &lt;a href="http://ansible.mobi/"&gt;Ansible Mobile&lt;/a&gt;. Ansible does 
            mobile advertising by such clients as Microsoft, Intel, Intuit, 
            Johnson &amp;amp; Johnson, and is a part of IPG.
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/angela-steele.png" alt="angela-steele" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Jesse Haines, Head of Marketing at Google Mobile Ads&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Jesse has been at Google since 2005. She's Google's #1 most powerful 
            woman in mobile ads due to that fact alone. Jesse's goal is simply to 
            persuade advertisers to get the basics right: A huge number of them 
            don't have mobile-optimized web sites, and mobile users often prefer 
            those for mobile shopping to apps.
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/jesse-haines.png" alt="jesse-haines" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Sara Wachter-Boettcher, Editor-in-Chief at A List Apart&lt;/h3&gt;

&lt;div class="grid"&gt;
    &lt;div class="span9"&gt;
        &lt;p&gt;
            Sara Wachter-Boettcher is a content strategist, writer, and the 
            editor-in-chief of A List Apart. An advocate for meaningful, 
            memorable, future-friendly content, Sara is the author of Content 
            Everywhere from Rosenfeld Media, a frequent conference speaker, 
            and an occasional blogger.
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href="https://twitter.com/sara_ann_marie"&gt;Follow Sara on Twitter&lt;/a&gt;
        &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="span3"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/sara-wachter-boettcher.png" alt="sara-wachter-boettcher" class=""&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Did we miss anyone? Let us know in the comments!&lt;/p&gt;&lt;/div&gt;</summary><category term="mobile web"></category><category term="influencers"></category><category term="top"></category></entry><entry><title>4 Preliminary Steps to Optimizing Your Site for Mobile</title><link href="http://www.mobify.com/blog/4-preliminary-steps-to-optimizing-your-site-for-mobile/" rel="alternate"></link><updated>2013-03-05T10:00:00-08:00</updated><author><name>Mike Abasov</name></author><id>tag:www.mobify.com,2013-03-05:blog/4-preliminary-steps-to-optimizing-your-site-for-mobile/</id><summary type="html">&lt;div&gt;&lt;p&gt;At first glance, adapting a website for mobile and tablet devices
can appear like a complex task.&lt;/p&gt;
&lt;p&gt;What content should be the most prominent on your mobile website? Which pages
should be optimized first? How should the layout change for different devices?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It's easy to get overwhelmed.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We created this article to arm you with the important data you'll need to begin
launching a successful mobile website, as fast and as painlessly as possible.&lt;/p&gt;
&lt;h3&gt;Site Analytics to the Rescue&lt;/h3&gt;
&lt;p&gt;Here at Mobify, we follow the belief that "when in doubt, look at the data."&lt;/p&gt;
&lt;p&gt;When optimizing your website for smartphones and tablets, the best place
to start is always with the site analytics.&lt;/p&gt;
&lt;p&gt;You already have visitors coming to your site from mobile, even if it's
just a small percentage at this point. By studying these users, you can
uncover insights into what matters the most to them, and how you can better
serve their needs.&lt;/p&gt;
&lt;p&gt;In this post, we'll be using &lt;a href="http://analytics.google.com/"&gt;Google Analytics&lt;/a&gt;
for our research, but other website analytics platforms should have similar
functionality.&lt;/p&gt;
&lt;h3&gt;Step 1. Segment out smartphone and tablet visitors.&lt;/h3&gt;
&lt;p&gt;Research has shown that &lt;a href="http://services.google.com/fh/files/misc/multiscreenworld_final.pdf"&gt;people behave differently on different devices&lt;/a&gt;.
And the context often matters a lot more than the screen size.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let's begin by looking specifically into our mobile traffic. Here's how:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Go to the Reporting section in Google Analytics.&lt;/li&gt;
&lt;li&gt;Switch to Audience &amp;gt; Overview in Standard Reports.&lt;/li&gt;
&lt;li&gt;Click on Advanced Segments.&lt;/li&gt;
&lt;li&gt;Check All Traffic, Mobile Traffic, and Tablet Traffic segments.&lt;/li&gt;
&lt;li&gt;Click Apply.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="image-700x350 image-frame"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/selecting-traffic-segment-mobile-tablet.png" alt="Selecting Traffic Segments on Mobile and Tablet"&gt;&lt;/div&gt;

&lt;p&gt;A new report will be generated showing how many visits you get from each
device type, as well as other useful information.&lt;/p&gt;
&lt;div class="image-700x350 image-frame"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/mobile-tablet-traffic-graph.png" alt="Mobile and Tablet Traffic Graph in Google Analytics"&gt;&lt;/div&gt;

&lt;p&gt;This is a great place to start learning about your mobile traffic. Look at
the metrics such as Bounce Rate or Pages/Visit and see how they compare
between device types.&lt;/p&gt;
&lt;h3&gt;Step 2. Learn about your top content.&lt;/h3&gt;
&lt;p&gt;We also want to find out which pages your mobile users visit
the most and which pages they land on when coming from different sources.&lt;/p&gt;
&lt;p&gt;For example, your Home Page may be the most visited page on your website.
But your Contact Page may be the one most people see first when they arrive
from search engines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To find out what your top content is, follow these steps:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Go to Content &amp;gt; Site Content &amp;gt; All Pages.&lt;/li&gt;
&lt;li&gt;Look at 3 segments (All, Mobile, Tablet) separately and pay attention to the
differences. &lt;em&gt;See anything surprising yet?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Repeat these actions for Content &amp;gt; Site Content &amp;gt; Landing Pages.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="image-700x350 image-frame"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/top-pages-report.png" alt="Top pages on Mobile and Tablet"&gt;&lt;/div&gt;

&lt;p&gt;You can use this information to prioritize your design and development effort.
We suggest aiming for at least the top 5 most visited pages and the top 5
landing pages. This should cover about 40-80% of your mobile traffic.&lt;/p&gt;
&lt;h3&gt;Step 3. Select the most important devices.&lt;/h3&gt;
&lt;p&gt;Next, let's identify which exact devices people use to access your site.&lt;/p&gt;
&lt;p&gt;To begin, deselect all Advanced Segments in Google Analytics and go to
Audience &amp;gt; Mobile &amp;gt; Devices.&lt;/p&gt;
&lt;div class="image-700x350 image-frame"&gt;&lt;img src="http://www.mobify.com/static/blog/2013/03/list-of-mobile-devices-in-google-analytics.png" alt="List of Mobile Devices in Google Analytics"&gt;&lt;/div&gt;

&lt;p&gt;This information is useful when prioritizing your mobile adaptions. Should you
build a mobile site or tablet site first? Do you have to tackle both
at the same time? This report will help you identify which devices to target.&lt;/p&gt;
&lt;h3&gt;Step 4. Set up benchmarks for performance.&lt;/h3&gt;
&lt;p&gt;Now that you know who your mobile visitors are, what content
they view and which devices they use, you're well-equipped to start making
informed decisions about going mobile.&lt;/p&gt;
&lt;p&gt;The last thing you should do is make a report of all the important metrics
and set up benchmarks and goals.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here's a list of metrics we use here at Mobify:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Conversion rates and revenue&lt;/li&gt;
&lt;li&gt;Mobile visits and percentage of total traffic&lt;/li&gt;
&lt;li&gt;Bounce rate for different devices&lt;/li&gt;
&lt;li&gt;Pages / Visit&lt;/li&gt;
&lt;li&gt;Praise vs. Complaints (this one's qualitative)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Keep track of these numbers over time to calculate your return on investment.&lt;/p&gt;
&lt;h3&gt;Wrapping Up&lt;/h3&gt;
&lt;p&gt;In order to ensure long-term success, your organization needs a well-designed
and high-performing mobile website.&lt;/p&gt;
&lt;p&gt;Digging into your site's analytics can help you uncover valuable insights and
make better business decisions when going mobile.&lt;/p&gt;
&lt;p&gt;For more resources and practical tips on going mobile, check out our free
&lt;a href="http://www.mobify.com/go/mobile-success-pack"&gt;2013 Mobile Success Pack&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</summary><category term="analytics"></category><category term="mobile"></category><category term="tablet"></category><category term="marketing"></category></entry><entry><title>Vancouver JS Meetup Recap</title><link href="http://www.mobify.com/about/media/vancouver-js-meetup-recap/" rel="alternate"></link><updated>2013-02-28T09:56:00-08:00</updated><author><name>Mike Abasov</name></author><id>tag:www.mobify.com,2013-02-28:about/media/vancouver-js-meetup-recap/</id><summary type="html">&lt;div&gt;&lt;blockquote&gt;
&lt;p&gt;On February 12th, the PayrollHero dev team in Whistler travelled down
to Vancouver to attend the Vancouver JS meetup. We reached town a bit
early, so we spent some time coworking from Launch Academy. Later in
the evening, we went to SFU Harbour Center where the event was being held.
Around 150 people attended the event. Two top notch speakers presented
in the meetup. Robert W. Hurst of Chloi presented a talk on LucidJS and
Peter McLachlan of Mobify presented a talk on Mobile performance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://blog.payrollhero.com/2013/02/28/vancouver-js-meetup-recap/"&gt;Continue reading on PayrollHero&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>