CSS/JS compress & set expires header
I couldn't find a discussion about this and don't know whether something technical or just missing time is preventing this.
But may I suggest to look into whether the CSS and JS files could be compressed into one each. I think this and adding expires headers on those would greatly improve the speed and convinience of using the site.
thanks
Attachments:
Thanks for the suggestions, thing is though most of the css is already in a single stylesheet, and the remainders are module specific and not always displayed. Most of the Js is already compressed, though one or two aren't yet. It is possible to squeeze out a bit more optomisation, but by and large its already pretty decent on that front. The images are are the big hitter, and there is not much more we can do about that.
Really the server could be upgraded, but Bart is paying for it all out of his own pocket, so we can't fault him there either.
thanks for replying. i just noticed there's still 17 CSS on the frontpage but i guess delieving the images really is the bigger load.
it might still load faster for frequent visitors if there's less individual requests to be made.
I actually count 20 on on the front page when logged in. They fall into three categories, system, module and theme.
MODULES:
system base
system menus
system messages
system theme
[ These could theoretically be combined into two, but the combination would have to be done again after every drupal update patch (potentially every few months). ]
MODULES:
module contextual
module comment notify
module comment
module date
module field
module logintoboggan
module node
module search
module user
module forum
module views
module ctools
module medals
mudle shortcut
module toolbar
[ These could again theoretically be combined, but the recombination would have to be done again everytime a module was updated or turned on (portentially every couple of weeks). Additionally, the same module styles aren't present for every page, and there are many more module styles than this, so the combined file would be much larger and most styles would be unused. ]
THEME:
Oga theme
[This is where the vast majority of rules live, it is all site specific, already combined and makes up the largest single style load. It could be minified to save 6kb quite easily, but as your graphs show, thats not going to reduce it much. ]
All in all with combinations and minifications we could save a handful of kilobytes and a few calls, which might buy us a 10% faster load time, but it would increase the amount of maintenance required. I'll look into it again when i've got some free time and access to the server.
cool, thanks for the detailed analysis.
You could try using mod_pagespeed https://code.google.com/p/modpagespeed/ which does this on fly.
to clarify would i originally meant: i think conventional wisdom is that doing another HTTP requests takes longer then downloading another KB of data.
the frontpage already has excellent cache headers (most importantly "expires", which tells the browser to not even ask the server whether the file is recent enough until the 'expires' date -> no http request).
so it seemed odd to me that everything is so well cached and optimized, yet those 17 CSS files aren't combined and don't have expired set.
sorry for rambling about this. it's really a minor thing and i'm very happy with how oga is run and the technical focus seems on the right track.