Preload critical assets

Preloading of critical assets is a premium feature of WP-Optimize.

Some assets which are considered critical might be loaded later because they are included via a script or from within a CSS file.

Typical examples include font files and background images. Loading these types of assets i.e. ones that users need for a page to function correctly, after non-critical assets doesn’t make sense. It negatively impacts page load times and user experience.

Preloading those assets however enables them to be loaded in priority order.

You can check Google’s articles here and here for more technical information.

 

When enabling minify, some functionality is broken. How can I fix it?

This usually means one or more of your JavaScript files are incompatible with the minification or merging process. It can also be caused by errors in the JavaScript’s syntax.

  • The first thing to try is to enable the setting “Contain each included file in its own block” in the JavaScript options (WP-Optimize > Minify > Javascript > JavaScript options). This could “catch” an error, and prevent the rest of the code to be broken.
  • If the first option didn’t work, try disabling merging of JavaScript files.

If none of the above works, disable processing of JavaScript files in the minify settings, and contact us on our free or premium support channels, we’ll do our best to help you troubleshoot the issue.

When enabling minify, my site’s layout is broken. How can I fix it?

This usually means one or more of your CSS files are incompatible with the minification or merging process. It can also be caused by errors in the CSS’s syntax.

You can check the CSS’s syntax by using an online CSS syntax checker such as csslint.net.

If your syntax is not causing the issue, or you cannot change the file with an issue, you can either

  • exclude the problematic CSS files from the minification and merging process.
  • or not merge the CSS.

To exclude individual CSS files from the minification and merging process, you can go to WP-Optimize > Minify > CSS and go to the “Exclude the following CSS files from processing” section (for more precise steps on how to exclude your CSS files go here).

To disable merging of CSS files, follow the instructions here.

How can I eliminate render-blocking resources?

You can eliminate all render-blocking resources by deferring all non-critical JavaScript and CSS files.

You can defer your JavaScript files by going to WP-Optimize > Minify > JavaScript and going to the “Load JavaScript asynchronously” section.

For more precise steps on how to defer your JavaScript files go here.

You can defer your CSS files by going to WP-Optimize > Minify > CSS and going to the “Load the following CSS files asynchronously” section.

For more precise steps on how to defer your CSS files go here.