WebPagetest Forums
Drupal CSS/JS Optimisation - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: Drupal CSS/JS Optimisation (/showthread.php?tid=7636)

Drupal CSS/JS Optimisation - lexbi - 11-13-2011 03:33 AM

I've been a web developer for a while now, and have only recently discover webpagetest, due to a client's server being terribad.

JS/CSS files are aggregated,
Keep-alive turned on,
Got JS files in the footer,
Boost module is installed, with htaccess amendments (Page caching).

Yet still 10secs or so for a page render.

I've optimised problem is that drupal appears to create 5 css or js files each when compressing everything. So was trying to find a module that slapped everything into 1 or 2 files and came across this in depth article which suggests that putting JS files in the footer does nothing without further work.

Quote:Just moving <?php print $scripts ?> to the footer won’t bring any result, because inline-scripts that will remain in the header will expect jquery.js and other scripts in the header and will return errors during execution.



RE: Drupal CSS/JS Optimisation - pmeenan - 11-14-2011 11:23 PM

Any chance you have a link to a test result you can share?

Yes, moving external javascript to the footer has to be done carefully because you need to make sure there are no inline scripts that depend on them that occur earlier in the page. If you have full control over the template and modules you can do it carefully.

A test result will help identify the key drivers for the long render time and help you target specific issues.



RE: Drupal CSS/JS Optimisation - luluberlu - 12-13-2011 06:28 PM

I used these modules with Drupal 6
Performance and scalability

- CacheRouter 6.x-1.0-rc2 Controls access to split caching functionality into self contained objects.
- DB Tuner 6.x-1.0-alpha2 Adds indexes to CCK fields used in views & more.
- HTTP Parallel Request Library 6.x-1.x-dev Send http requests out in parallel in a blocking or non-blocking manner.
Requis par : Imageinfo Cache (activé)
- Imageinfo Cache 6.x-2.1 Cache image_get_info. Useful if files directory is not local. Will also generate imagecache presets in the background.
Dépend de : ImageCache (activé), HTTP Parallel Request Library (activé), ImageAPI (activé)
- JavaScript Aggregator 6.x-1.6 Compresses the aggregated JavaScript file when Optimize JavaScript is enabled.