Turbocharge Your Mobile Website with Data URIs
By Aaron Rudger | June 29, 2012
For the month of June, Bing was able to surpass Google to take the top spot in our Mobile News and Portal Index, shooting ahead in terms of speed by 0.3 seconds. Both sites have are relatively fast and have maintained their positions at the top in 2012. But if you're not Google or Bing, how fast is fast enough? Chances are that if you ask your mobile website visitor-- they want fast.
Keynote's Competitive Research group found that 2 out of 3 (64%) of smartphone users expect their webpage to load in 4 seconds or less. Yet according to our industry indices for mobile, few sites deliver to those expectations. So, want a free tip that can help you to speed up your mobile site? Consider using Data URIs. Google and Bing are using them, and perhaps you should too.
Data URIs may be the key to unlocking your site speed
The Data URI is the Uniform Resource Identifier. Using Data URIs is a smart way for mobile websites to avoid slow round-trip HTTP requests for small image files by placing the image content directly into the HTML document itself.
Benefits from Data URIs
The main benefit from using Data URIs in mobile site design is avoiding delay and reducing latency with extra HTTP requests. Including the image directly in the base document for the web page means that no new HTTP request needs to be made, avoiding delays to receiving content on your mobile device.
When to Avoid Data URIs
While the increase in speed is quite useful, there is a downside to using URIs. Images included with Data URIs are not cached separately from the HTML file in which they are contained. In other words, if your image needs to be used on multiple pages of your site, a Data URI might not be best optimization strategy. Using Data URIs Optimally Based on the benefits and drawbacks, you would not want to use a Data URI to package your corporate logo that appears on every page of your mobile site. However, you would want to use a Data URI for a feature image placed only on the homepage. Pages with unique content and small images are great candidates for leveraging the benefits of Data URIs.
Delay is a critical factor in mobile website access and loyalty. The longer your mobile website takes, the less likely you’ll have return visitors. Monitoring the ebbs and flows of your mobile website and identify key factors is site delay are important to your mobile websites overall performance and customer retention. Utilizing techniques like optimizing your mobile site and using Data URIs speeds the path to get ahead of the competition.