How to reduce VirtueMart page load time by 8% with two clicks

Speeding up your VirtueMart eshop is not always so difficult, there are small changes that anyone can do to gain some speed. This how to is one of the simplest things you can do to reduce your VirtueMart page load time a bit.

Two common things that usually slow down pages are the CSS and javascript files that the browser has to download from a page. These files require more requests by the browser to the server and also increase the overall page size.

VirtueMart as many other extensions is loading CSS and javascript files that are not always necessary and can be safely disabled without affecting the page functionality. Such files are the chosen related css/js files and the jQuery UI files.

Disabling chosen and jQuery UI in Virtuemart

To disable these files login to your Joomla administration and go to VirtueMart configuration page, from there select the "Templates" tab and at the bottom right of the page, find the "Activate CSS Styles & Javascripts" options. The options you need to disable are "Using the VirtueMart jQuery" (only if you are using Joomla! 3) and "Use jQuery chosen for dropdowns in FE".

Virtuemart configuration page with Templates tab selected.

Activate Css Styles & Javascripts options in Virtuemart.

Testing and results

To test how these files affect the page load time and page size we installed on a shared hosting account Joomla! 3.6.4 and VirtueMart 3.0.18 with sample data. First we tested the page load time in Chrome browser with the default VirtueMart settings, then with jQuery option disabled and last with both jQuery and chosen options disabled. After we collected the results we also run the same test on Pingdom tools to see if the results are similar.

You will see in the table and the images below that the findings are very interesting, the page size dropped more than 34% and the page load more than 8%.

Settings Requests Page size Load time Requests % Size % Load time %
Default 35 773kb 1.85s      
No jQuery UI 32 542kb 1.73s -8.57 -29.88 -6.48
No jQuery UI & chosen 29 506kb 1.7s -17.14 -34.54 -8.1

Tested on Pingdom tools with default settings

Pingdom tools results with default settings.

Tested on Pingdom tools with jQuery UI and chosen disabled

Pingdom tools results with jQuery UI and chosen disabled.

The most important finding in this test is the page size decrease that will actually make the big difference in page load on slower connections and mobile devices. Amazon demonstrated that every 100 milliseconds of latency will result in a 1% loss in sales. Which means, that for Amazon every second of latency will cost approximately 10% of revenue!

Not bad for a two click optimization :)