and <body> tag unless you know what you’ re doing. ❏ Box-model property: ❏ Width, height, padding, margin. What make a good performance web → High Performance Code HTML
a stylesheet. ❏ Go easy with box-shadow! ❏ Avoid deep nesting. ❏ Utilize transform and opacity properties to achieve smooth 60fps animation. What make a good performance web → High Performance Code CSS
300ms tap delay Every touch-based mobile browser, has ~300ms delay between you tapping a thing on the screen and the browser considering it a "click". ❏ Delay demo ❏ No delay demo
Use mobile-optimised viewport meta tag ❏ Use Javascript library to eliminate 300ms tap delay What make a good performance web → Fast & Lightweight 300ms tap delay
→ 300ms tap delay Use JS library In Suitmedia, we use FastClick by Financial Times Lab to eliminate 300ms tap delay. FastClick.attach( document.body ); References: ❏ FastClick
→ 300ms tap delay Provide active state interaction To make your site feel faster, you need to make your buttons respond immediately to a user's touch and give that user a great visual indication that something is happening.
Assets Minification Minification (also known as uglifying) refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser.
Bundling all assets into 1 file ❏ Bundled JS file size can up to 500KB-1MB. HTTP request is reduced, but it ends up forcing user to download 1 bulk file in 1 request. ❏ As the web grows, more dependencies might be added. Resulting bigger file size to download.
→ Load-on-demand Assets Load single asset Modernizr.load({ load: ‘path/to/jquery.js’, complete: function () { // jQuery is loaded // Do your things } });
→ Load-on-demand Assets Load multiple assets asynchronously Modernizr.load({ load: [‘jquery.js’, ‘moment.js’], complete: function () { // jQuery and Moment is loaded // Do your things } });
30 images in it, how many of them will be seen by your visitor? By default browser will download all images no matter what. What make a good performance web → Minimum HTTP Request Lazy load images