Be the first user to complete this post
|Add to List|
What are reflows and repaints and how to avoid them
A reflow is a user-blocking operation. It consumes relatively higher CPU time and will result in a degraded user experience on a mobile device if it happens to often.
Causes of reflows As a rule of thumb - anything that affects the current 'flow' of elements in the page will trigger a reflow. Some of the causes of reflows are
In most cases, reflows are followed by a repaint.
- Managing the browser navigation history using HTML 5 pushstate and popstate
- pseudo elements vs pseudo classes
- Getting started with localStorage vs sessionStorage in html5
- window.onload vs document.onload
- sessionStorage vs localStorage vs cookie applications
- A simple requestAnimationFrame example visually explained