To minimise the number of GET operations and the size of transmitted files we can go to Configuration -> Development -> Performance. Therein there are many options, cache related ones in particular. Under Bandwidth Optimisation there are two relevant options which are not yet used.
- One option is “Aggregate and compress CSS files.“
We enable the second option only, then press the “Save Configuration” button.
Press “Save All” to save the output to a file. This will be used to compare the number of files before and after the change.
Close Live HTTP headers (the window).
Apply the optimisation changes (as above, ensure the green box says “Your configuration options have been saved.”) and repeat the process again, this time choosing “Save All” and choosing another filename.
Open a text editor and start comparing the files. Suffice to say, if there are issues loading pages after applying the above change, then stop and investigate. A more thorough investigation (beyond ensuring the settings have a positive effect) will come later.
GET request is for
/sites/default/files/js/js_[SOME_LONG_CODE].js, not something with “modules”. This means that a new cache-esque file was generated which combines several others. Drupal saves it on disk for performance improvements.
Generally speaking, another sanity check can be comparison of file sizes of the file ‘dumps’ Live HTTP headers. For the main page of one test site, the “before” file is 131KB in size, whereas the “after” file is 106KB in size. This indicates that a lot less was included in GET requests; getting pertinent details (like which requests were spared) is a more time-consuming exercise.
Site Integrity Tests
This would of course depend on the site at hand.
Once the browser has the debugger installed and enabled run through a few pages while the console is visible to identify any issues which remain. File -> Open Web Location is another option. Once all is clear and there are no major errors (if any errors at all) it seems ready for permanent switchover to this operation mode.