4. IMAGE OPTIMIZATION
100 Milliseconds
▸ Time the occipital lobe in our brain needs to store visual information.
▸ Google suggests: page load times of less than 100 ms:
illusion of instantaneous website response.
▸ Acceptable website performance: 1s of page load time does suffice in maintaining
seamless flow of thought.
▸ At 10s of delay: low attention span, impatience, frustration and feeling of abandonment.
5. OPTIMIZATION
▸ 1 in 4 visitors abandon the website if load time >4 seconds.
▸ 46% of users don’t revisit poorly performing websites.
▸ 5s to engage visitors before they consider leaving.
▸ 1s delay = $1.6 billion in annual losses for online merchants as
big as Amazon.
9. CLEVER DESIGN
CSS IS YOUR FRIEND
▸ Images only when nessecary.
▸ Try to use colors, text, CSS animations & transitions.
▸ More whitespace!
▸ Use a fluid and awesome grid (i.e. CSS Grid ❤)
▸ Font loading (@font-face has issues).
▸ font-display CSS property?
10. CLEVER DESIGN
MOBILE FIRST
▸ Mobile internet users have shorter attention span & lower patience.
▸ A good mobile design makes users less likely to engage with the company in
the future.
20. IMAGES OPTIMIZATION
TIPS
▸ Upload your images at scale and not rely on CSS to size them.
▸ Different image files depending on user device.
▸ Experiment with different compression settings
▸ Strip meta data.
▸ Set Image Resolution to 72dpi
24. OPTIMIZATION
CLEVER CODING
▸ Utilize inheritance
▸ Value replication (e.g., margin: 10px 20px 15px 5px;)
▸ Short id and class names.
▸ Use less meta tags
▸ Group external CSS & JS files
▸ Asynchronous & deferred JavaScript (async & defer), or script just before </body>
31. ASSETS OPTIMIZATION
USE EXPIRES HEADER
▸ for files that don't get updated often.
(images, CSS etc)
▸ .htaccess file
▸ example:
ExpiresByType text/css "access plus 1 year”
32. ASSETS OPTIMIZATION
USE A CDN
▸ Content Delivery Network A Content Delivery Network
▸ Network of servers in different geographical locations.
▸ Each server has a copy of a site’s files.
▸ When a visitor requests a file: file delivered from nearest server.