开发者

Compiling static content for a web site

开发者 https://www.devze.com 2023-01-23 16:42 出处:网络
I\'ve been looking for techniques on how to manage static content for a web application.From what I\'ve found, there is the pure OO approach, packaging all specific requirements in object metadata and

I've been looking for techniques on how to manage static content for a web application. From what I've found, there is the pure OO approach, packaging all specific requirements in object metadata and generating a single CSS and JS file for each request path either in real time or compile time. There is also the technique of manually merging on each release.

My question is, what general techniques do you find useful when managing static data for a dynamic web application and have you found any partic开发者_高级运维ular software helpful (besides SVN/Git/etc.)?


I use Phing (Ant for PHP) to run the CSS/JS through a compressor. From a user's browser, these compressed files are accessed via a resource retriever much like Facebook's rsrc.php. This script maps generated names to the physical names for browser cache control because the cache periods are rather long. These names are also changed when the CSS/JS is compressed to force users' browsers to grab fresh copies.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号