WP Rocket ASYNC CSS | Derrick Hammer

Description

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);

Installation

This section describes how to install the plugin and get it working.

  1. Upload the plugin files to the /wp-content/plugins/rocket-async-css directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. View HTML source, and test it out!

Plugin author

Derrick Hammer

Plugin official website address

https://wordpress.org/plugins/rocket-async-css/
If you encounter problems in using the WP Rocket ASYNC CSS plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.