[wp-hackers] Re: Plugins & CSS, embeded vs linking
Otto
otto at ottodestruct.com
Tue Jul 15 17:44:20 GMT 2008
On Tue, Jul 15, 2008 at 12:27 PM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
> I think browser caching is better than server caching in this case. If the
> CSS is dynamically generated at the server, it is "new" every time -- or at
> less more frequently, as it changes from page to page.
Browser caching is almost always better than this sort of thing, the
problem is that many web developers don't understand caching and
headers and such properly, and so they end up implementing straight-up
ridiculous solutions to problems that have already been solved.
One of the worst I've seen is these "CSS compressor" things. Instead
of using proper caching methods to avoid sending the data every time,
they end up doing useless things like preprocessing them to remove
whitespace, sticking them all together to eliminate extra http
connection overhead. The result is that they do a lot of processing on
every request and send that one (smaller) file repeatedly, instead of
sending it one time only and never sending it again until it actually
changes.
I admit that the notion of processing your data to improve size and
speeds has it's place, but the benefits are so tiny by comparison to
simply getting your friggin' cache headers correct that it's almost
not worth the trouble.
-Otto
More information about the wp-hackers
mailing list