On 9/3/07, Ken Woodruff <[EMAIL PROTECTED]> wrote:
Not specifically Mason, but...

>> Makes sense to a point...but why load 10 files if the page only
>> needs 2?

Because files are cached by browsers, unless the CSS code itself is
dynamic or the large majority of users hit exactly one page ever on
your site concatenation is unlikely to be a net benefit.   If you
make the CSS dynamic, e.g. having a "smart" concatenator at "http://
www.example.com/my-mason-concatenator.css ", caching won't work and
the browser will have to download the entire CSS on every hit, even
if it's the same content as last time.  Since browsers may also cache
the *parsed* CSS in memory you'll can also have a performance hit on
the client side.



I'm allowing the dynamic css and javascript requests to be cached though.


How - with an explicit Expires or max-age header?

One advantage of static css files is that Apache will automatically handle If-Modified-Since/Last-Modified headers, which caches but also ensures that changes to the css will be seen immediately.

Jon

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to