Documentation

General / JavaScript Post-Processing

Posted in: Getting Started (4) Plugin Options Explained (35) Actions / Filters (30) How To (14)   

This functionality is available for PRO version.

The Post-Processing functionality is a key feature provided by the WP Hide plugin. That along the Html/Css/JS Replacements provide a way to change virtually anything on the code ( HTML, CSS, JavaScript ).  So whitelabel plugins and theme is possible through this feature, for example How to white label Elementor also Hide your Avada Theme, Avada Builder and Fusion core.

JavaScript Post-Processing type

The available options for this function are:

  • Combine
  • Combine & Encode Inline
  • In Place
  • In Place & Encode Inline

One of the above selections is a requirement for Html/Css/JS Replacements functionality to run.

The Combine JavaScript Code option is an excellent way to improve the SEO aspect of a site.
One of the hardest challenge for modern sites, when trying to make web pages load as fast as possible, are the JavaScript assets. They are generally heavy and split across many files. For an average site, over 50% of total HTTP requests consist of JavaScript files load. Accordingly to Google and Yahoo advises, Decreasing the number of components on a page reduces the number of HTTP requests required to render the page, resulting in faster page loads:

The Combine JavaScript Code does just that, it combines all JavaScript files into a couple of assets which are being called on-site header and footer. This dramatically decreases the overall time required to load all site assets as the total number of calls has decreased by 50%. This is an example of Page Details through gtmetrix.com before and after using Combine JavaScript:

After the Combine applying functionality:

 

Remove Comments

The feature removes any comments from the JavaScript assets when using any of the selection at JavaScript Post-Processing type.

Defer Combined JavaScript

This is an advanced option mainly for SEO adjustments. All combined JavaScript assets are deferred.
When a web page loads, before the web browser can begin to display the content, any render-blocking resources ( JavaScript and Cascading Style Sheets ) must be first loaded. Most people don’t notice this happening when visiting a link until it takes longer than about 3 seconds. The reason that pages don’t load up as soon as the HTML for the page is loaded is a cause of render-blocking resources. The defer attribute tells the browser to only execute the script file once the HTML document has been fully parsed, hence the display time of the page being drastically reduced.

Defer a JavaScript asset

When not using Defer Combined JavaScript which defer all scripts, this option can be used to specify individual assets that should be deferred.

Exclude script from JavaScript Combine

Specify the asset files which will not be included in the JavaScript Combine procedure, so they will be left as is.

Exclude JavaScript Block from Combine

Specify partial JavaScript code block to be excluded from Combine. Use a full line or part of it (not individual words) to avoid matching other JavaScript code. This is very useful for codes that contain errors and need to be left outside of the main combined assets.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Scroll to top