Remove or Defer Unused CSS
For viewing all tips see here
Applicable To
All Browsers
How Improves Page Load Time
o By optimizing network latency (HTTP Payload Size)
o By optimizing browser rendering
Prologue
Before a browser can begin rendering a web page, it must first download and parse any style sheets that are required to lay out the page.
Why
o Even if an external style sheet is in the cache, rendering is blocked until Browser extracts style sheets from the disk
o CSS engine unnecessary process unused / unwanted rules contained the CSS file
How
o Remove any inline style blocks containing CSS not being used in current page
o Minifying CSS
o If external style sheets being shared by multiple web pages and all CSS rules are not being used in all the pages then break down the style sheet files in many smaller files specific to web page need
o Defer the style sheet if not required during startup by putting after the onLoad event is fired
Exceptions
None
Recommendations
None
Comments
Post a Comment