Move CSS to head

PageSpeed Optimization Filters

Benefits

Move CSS to head ensures timely discovery of CSS assets by the browser and reduces rendering re-flows by ensuring that all CSS elements are in the head section.

Configuration

Enable pagespeed EnableFilters move_css_to_head
Disable pagespeed DisableFilters move_css_to_head

Risk Classification

Low

This filter is considered low risk. However, JavaScript that is executed before a CSS element will see a different view of the DOM in the presence of this rewriter: the CSS element will now be in the head. If there is such JavaScript embedded in the middle of a page then this rewriter may change its behavior.

Example

soon available