Tech Support Websites

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 8 November 2012

HTML5 Performance Tips & Tricks

Posted on 09:11 by Unknown

Jatinder Mann's presentation at the Build 2012 conference "50 performance tricks to make your HTML5 apps and sites faster" has some interesting facts & 50 tips on improving performance -


* 3 dimensions to improve web performance -
- Network
- CPU
- GPU

* AJAX performance does not wholly depend on JavaScript performance

* Where does the CPU time go?
  1. Networking
  2. HTML
  3. CSS
  4. Collections
  5. JavaScript
  6. Marshalling
  7. DOM
  8. Formatting
  9. Block building
  10. Layout
  11. Rendering


Most of the 50 tips are well covered in Souders' book High Performance Web Sites and the YSlow documentation. Listed here are some among the 50 that apply to HTML 5 & modern web development -

* Avoid 3xx Redirection - 63% of top 1000 websites worldwide contain a 3xx level redirect. A redirection can cause a delay of upto 250 ms or 10% of the typical page load time.

* Persist App resources locally in Package

* Cache dynamic resources in App Cache (new in HTML5)

* Cache data requests - jQuery.ajax() has a cache property that can be set to true

* Always load pages in the latest standards mode in IE

* Use HTTP Header to specify legacy IE modes

* Avoid Using @import for Hierarchical Styles

* Avoid Embedded and Inline Styles to prevent the frequent context switches between HTML & CSS parsers

* Only Include Necessary Styles

* Remove Duplicate Code - 52% of the pages on the web have duplicate code

* Asynchronously Download Script using the async attribute

* Standardize on a Single Framework

* Replace Images with CSS3 Gradients

* Replace Images with CSS3 Border Radius for rounded corners (border-radius:18px;)

* Use DataURI’s for Small Single View Images - (are they cacheable?)

* When you're using HTML5 provide a user preview image or else the browser has to download the video, figure out what the first frame and then display it

* Minimize Media Plugin Usage - HTML5 video is no less faster than Flash, Silverlight or Quicktime plugins

* Stick to Integer Math - where possible convert floating point numbers to integer using Math.floor, Math.ceil

* Initialize JavaScript on Demand instead of loading external JS libraries on page load

var userTileScriptsLoaded = false;
function CustomizeUserTile()
{
if (userTileScriptsLoaded == false)
{
var head = document.getElementsByTagName("head")[0];
script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'upload.js';
head.appendChild(script);
}
}

* Use Selectors API for Collection Access
document.querySelectorAll(".required");

* Standardize file capitalization convention - wonder how this improves performance?

Related:
Web Performance Analysis & Optimization tools

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in HTML5, Performance | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Windows 8 keyboard shortcuts
    Win + X   - context menu to access common features like Control Panel, Task Manager, File Explorer, Programs & Features, Run, Search etc...
  • My 30-day personal project - watch 100 hours of Pluralsight videos
    Inspired by Matt Cutts' 30-day challenges , I plan to watch 100 hours of Pluralsight online videos to get up-to-date with current ...
  • Archive tweets & favorites with Google Reader
    There are numerous ways to archive tweets but rather than use yet another tool, I prefer using Google Reader to preserve the tweets I mark ...
  • Azure in Pictures - overview of Windows Azure Features, Services and Common Uses
    Download the Windows Azure Poster in PDF format (1.1MB)
  • Dashboard-like info with Browser tabs, Windows 7 Taskbar tabs
    Browser tabs & Windows 7 Taskbar tabs are turning self-aware.  This is how my browser looked the other day: I had the summary of all tha...
  • What is the difference between Browser Mode & Document Mode in IE
    If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three ...
  • 10 ways to make laptop battery last longer
    Paraphrased from a Right Choice magazine article with my own opinions: Keep the brightness of the screen as low as possible. If portability ...
  • India ranks fourth in Internet usage
    Deepak Shenoy informs that as per Telecom Regulatory Authority of India (TRAI) data, India has nearly 10 million Broadband connections in ...
  • HOW TO let Google watch over your web activity
    When we get onto the Internet, we trade our privacy for convenience. Everyone from marketers, ISPs to Governments can watch our activities o...
  • The Glorious History of Internet Explorer
    Love it or hate it, you will have to appreciate IE’s staying power. Having been around for 16 years, it is still the browser market leader ....

Categories

  • AJAX
  • Android
  • APIs
  • App
  • ASP
  • ASP.NET
  • ASP.NET-MVC
  • Azure
  • Azure SQL Database
  • AzureInPictures
  • Bing
  • Book Review
  • Bookmarklet
  • Browsers
  • C#
  • chart
  • Chrome
  • Cloud
  • CSS
  • CSS3
  • DidYouKnow
  • E-Commerce
  • Excel
  • FB
  • Fiddler
  • Firefox
  • Gadgets
  • GeoLocation
  • GMail
  • Google
  • Google Docs
  • Google Reader
  • Health
  • Hotmail
  • HOWTO
  • HTML
  • HTML/CSS
  • HTML5
  • Humor
  • Hyderabad
  • IE
  • IIS
  • India
  • Internet
  • IT
  • Javascript
  • jQuery
  • JSON
  • JSONP
  • Laptop
  • Learning Resources
  • Lists
  • Map
  • Metrics
  • Microsoft
  • miscellaneous
  • Mobile
  • NAPA
  • Office365
  • Opera
  • PDF
  • Performance
  • Personal
  • PHP
  • PM
  • PowerShell
  • Privacy
  • Programming
  • Rant
  • Safari
  • Science
  • Search Engines
  • SearchEngines
  • Security
  • SEO
  • Sharepoint
  • SharePoint2013
  • Silverlight
  • Software Engineering
  • Solutions
  • SQL Azure
  • SQL Server
  • TFS
  • Tip
  • Tips
  • Tools
  • Tools/Utilities
  • Trivia
  • TWIL
  • Twitter
  • UX
  • VM
  • VS.NET
  • VS2010
  • VS2012
  • WCF
  • WebApps
  • Websites
  • WF
  • Windows Phone
  • Windows7
  • Windows8
  • Word
  • WP7
  • WPF

Blog Archive

  • ►  2013 (112)
    • ►  October (16)
    • ►  September (14)
    • ►  August (8)
    • ►  July (8)
    • ►  June (13)
    • ►  May (12)
    • ►  April (12)
    • ►  March (8)
    • ►  February (15)
    • ►  January (6)
  • ▼  2012 (127)
    • ►  December (11)
    • ▼  November (14)
      • Azure in Pictures - overview of Windows Azure Feat...
      • Infographic - Microsoft Technologies
      • 8 tips to make your passwords harder to crack
      • The Pain of Passwords
      • jQuery Visual Navigation Menu plugin to highlight ...
      • "97 Things Every Software Architect Should Know" i...
      • GeoBuzz - our first Windows 8 Store app is now ava...
      • A geography game made from a mashup of Picassa & G...
      • Windows 8 Store App - Case Studies
      • India-centric Windows 8 Store Apps
      • HTML5 Performance Tips & Tricks
      • Free exam voucher for "Programming in HTML5 with J...
      • 15 well-known developers tell what they love about...
      • HOW TO access MSDN documentation offline/locally w...
    • ►  October (13)
    • ►  September (14)
    • ►  August (16)
    • ►  July (16)
    • ►  June (6)
    • ►  May (5)
    • ►  April (11)
    • ►  March (12)
    • ►  February (7)
    • ►  January (2)
  • ►  2011 (98)
    • ►  December (5)
    • ►  November (2)
    • ►  October (5)
    • ►  September (7)
    • ►  August (7)
    • ►  July (15)
    • ►  June (10)
    • ►  May (7)
    • ►  April (8)
    • ►  March (10)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (163)
    • ►  December (14)
    • ►  November (19)
    • ►  October (19)
    • ►  September (15)
    • ►  August (18)
    • ►  July (17)
    • ►  June (20)
    • ►  May (17)
    • ►  April (19)
    • ►  March (5)
Powered by Blogger.

About Me

Unknown
View my complete profile