WordPress plugin to combine all inline, external, and remote CSS and load async. Depends on WP-Rocket
This is NOT an official addon to WP-Rocket!
Author: | Derrick Hammer (profile at wordpress.org) |
WordPress version required: | 4.5 |
WordPress version tested: | 5.4.1 |
Plugin version: | 0.7.1.3 |
Added to WordPress repository: | 20-04-2016 |
Last updated: | 09-03-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 56 |
Rated by: | 4 |
Plugin URI: | https://github.com/pcfreak30/rocket-async-css |
Total downloads: | 45 844 |
Active installs: | 700+ |
Click to start download |
This plugin will combine all inline and external CSS in the order found on the page and save it to WP-Rocket’s cache folder as a new file. Files with media attributes are wrapped in @media
selectors during processing. Async is powered by https://github.com/filamentgroup/loadCSS.
If you are looking for a professional team to get your WordPress site to run faster, check us out for our speed optimization, google my business, seo and local seo services at Rank Grow Digital
Filters rocket_async_css_process_style
and rocket_async_css_process_file
can be used to selectively exclude any inline CSS or external CSS from minify and async loading.
Examples are:
function exclude_css($skip, $css){
if ( false !== strpos( $css, 'something' ) ) {
return false;
}
return $skip;
}
add_filter('rocket_async_css_process_style','exclude_css', 10, 2);
and
function exclude_file($skip, $url){
if ( 'some url' == $url ) {
return false;
}
return $skip;
}
add_filter('rocket_async_css_process_style','exclude_file', 10, 2);