On Thu, 30 Aug 2007, Anthony Ettinger wrote:
> On 8/30/07, Andrew Chilton <[EMAIL PROTECTED]> wrote:
>>
>> On 31/08/2007, Anthony Ettinger <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> On 8/30/07, Alfie John <[EMAIL PROTECTED]> wrote:
>>>>
>>>> However, if your CSS files are purely static, they shouldn't be
>>>> handled by mason in the first place.
>>>>
>>>> Alfie
>>>
>>>
>>> They are static files, but I only want one request to load all css
>> files.
>>> Which is why I am writing a mason component that spits out all css files
>>> concatenated.
>>
>> I agree with Alfie.
>>
>> Therefore, you should look at concatenating all the relevant CSS files
>> in your build/deploy script and then let webserver handle the static
>> serving of the single file. If you're not doing anything dynamic with
>> Mason in the CSS then just let webserver do what's it's good at and
>> just create it the once instead of dynamically many times. This is
>> *much* easier than doing what you suggest on every request.
>>
>> Andy
>
> Makes sense to a point...but why load 10 files if the page only needs 2?
Just so we're all clear, I think the people in favour of runtime
concatenation are making the point that they're choosing *which* CSS files to
load on a per-page basis.
I think they should use multiple requests. Example:
Page 1 loads CSS files A, B, and C
Page 2 loads A, D, E, and F
Page 3 loads A, B, and E
If a user loads all three pages, and each CSS file is 10k, then in the
concatenation scenario, they load 100k in 3 requests, whereas in the
individual files scenario, they load 50k in five requests.
I suppose it depends on a number of other things too.
:)
---------------------------------------------------------------------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: [EMAIL PROTECTED] | I am |
---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users