@Lucas:
... it's always better to keep your css (and js) in static files ...
That's simply untrue. This depends on what you are doing with it. For instance, with MODX you can modify static files upon request and this will manipulate performance statistics, as well. The only way to remove MODX from performance statistics is to STORE the files outside of anywhere MODX has any control. Otherwise, it is subject to MODX security and other access parameters whether it is static or not. Even then, performance is subject to .htaccess and the way it manages URI requests. A poorly programmed .htaccess may affect performance of any site regardless of whether it is static, dynamic, in MODX or outside of any CMS.
You also miss out on browser caching..
Untrue, as well. Browser caching is based upon URI, content type, and content expiration. All of these may be set by whatever server script you would like. How the server serves it determines whether or not the browser may cache it. PHP, ASP, etc have nothing to do with it. You may serve cached PHP for instance.
Further Notes:
These options are set in the HTTP header. PHP has many such options to provide access to the HTTP Header. The only distinction is that it
must be modified and served before
any content is returned. If this were not the case, PHP minified CSS and JS coulld not be browser cached. In many cases they can and are browser cached. Your statement also removed server caching from the equation. Server caching can further manipulate performance statistics.
Additionally, there is argument as to whether browser caching is even preferable. It is largely based on the caching mechanism, because it is subject to the functionality of the browser itself. Browser caching is often linked to poor performance and even lack of performance. As a result, it is often the very first troubleshooting step in resolving most site-specific issues. How the code is designed, and how the interpreters utilize it will
always be the deciding factor in performance, and whether caching is necessary or even desired.
[ed. note: fuzzicallogic last edited this post 14 years, 1 month ago.]