General / JavaScript Combine

Posted in: Getting Started (4) Plugin Options Explained (32) Actions / Filters (25) How To (12)   

This functionality is available for PRO version.

The Combine JavaScript Code is a requirement for Html/Css/JS Replacements functionality which helps to whitelabel virtually any plugin/theme deployed on a WordPress site. The Combine JavaScript Code feature is also 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 couple 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 before and after using Combine JavaScript:

After the Combine applying functionality:


Combine JavaScript Code

This controls the status of JavaScript combine functionality. If being set to Yes, all assets are being compiled into couple assets, stored on the server-side and delivered as cached files for fast loading.  This option greatly improves the SEO performance of the site. Also, the new

Defer Combined JavaScript

This is an advanced option mainly for SEO adjustments. All combined JavaScript assets will be 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 load. 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