Yahoo Yslow - can we cache the .php stylesheets

Yahoo Yslow - can we cache the .php stylesheets

by Matt Gibson -
Number of replies: 2
I've noticed, using Yslow (more info) that the stylesheets are the biggest part of my page loading time. However, I already tell apache to cache .css files - are the styles.php one to blame?

has anyone got a way to modify the mod_expires directives so that individual files can be cached, or if this is even a good idea?

To illustrate - here are the cache performance stats for moodle.org (this page)


Empty Cache Primed Cache
31.9K 1 HTML document
183.5K 4 Style Sheet Files
215.4K 11 JavaScript Files
7.0K 39 Images
1.8K 7 CSS Images
439.7K Total size
62 HTTP requests
31.9K 1 HTML document
119.8K 4 Style Sheet Files
0.03K 11 JavaScript Files
0.0K 39 Images
0.0K 7 CSS Images
151.8K Total size
62 HTTP requests


In other words, 79% (!) of the page load of moodle.org with a primed cache is taken up by its style sheet. The numbers are roughly the same for my site.

Am I right in thinking its possible to gain a large decrease in page load time?

Matt
Average of ratings: Useful (1)
In reply to Matt Gibson

Re: Yahoo Yslow - can we cache the .php stylesheets

by Matt Gibson -
Maybe this isn't accurate, as a look at the net tab shows that these css files are not actually requested. Maybe just a wekaness with Yslow.
In reply to Matt Gibson

Re: Yahoo Yslow - can we cache the .php stylesheets

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
That's correct, all the CSS already has all the headers needed to force their caching (since about Moodle 1.2).