Most of us devs have a nice machine and/or a pretty fancy phone.
The sites you develop always look smooth and sweet on your devices but... Do your users have the kind of experience you wish?
In this talk I will review, on a high level, how the browser rendering works, how your HTML, CSS and/or js impacts on page rendering/loading and share techniques to minimize the impact.
presented @ codebits VI (2012) in Lisbon
22. REFLOW
even more expensive than a repaint
can be triggered by many actions
so avoid inline css/js
and even a offsetWidth/Height calculation triggers it
23. JS RENDERING TIME
the model of the web is synchronous
when a script tag appears, it will parse and execute the script
in FF and Webkit another thread continues to parse the HTML doc
24. JS RENDERING TIME
it can lock your rendering
it can also produce repaint/reflow
which means it will take longer to execute
39. IMAGES
set width and height
crop extra space around images
use the best file format
eg. use png-8, gif to reduce the number of colors in the pallette
40. HTTP
Use gzip where possible
reduce dns lookups
use cookieless domains for static content
use a CDN
avoid redirects
41. FRONTEND SPOF
any 3rd party widget
custom font downloading
even your own JS can cause it...
wumocomicstrip.com