Let's consider that the total time to download a webpage is divided into two main sections.
- In the first instance, after the browser's request is received by the server, the Content Management System (CMS) generates the HTML based on the request and outputs the HTML to the browser;
- And the second part, the time it takes for the browser to download and parse the HTML, and download and execute the associated resource files whose links were embedded in the HTML.
The plugin reduces the time taken for the second part by intercepting the generated HTML on the server and optimize both the HTML and the files to download before it is sent to the browser. The plugin can perform several optimization techniques based on what features are configured. These optimizations minimize the number of http requests the browser makes to download the page, and reduce page size and results in faster page loading times, reduced server load and lower bandwidth requirements for your website.
Example 1.2. JCH Optimize generated links on various CMS platforms
This is a relatively over-simplified explanation of how the plugin works but it gives the general idea. Combining files can be considered the core feature of the plugin and this feature is available in both the Free and Pro versions. The other optimization features are performed in a similar manner, where the HTML is intercepted in the CMS and regular expressions are used to identify the areas of interest to do modifications to the HTML before it is sent to the browser.
These optimizations may sound time-consuming of themselves and one would wonder if they are actually gaining on one end but losing on another. Well the plugin uses state of the art techniques that were developed in-house to perform these optimizations at blazing speed. Additionally the plugin caches time consuming tasks so the optimizations are not done on every page load. Typically it would take about 2 seconds to optimize the page but on subsequent requests, the plugin should run in less than 100 milliseconds on an average server.