User loginRecent blog posts
Homeland Security Advisory System
Popular contentToday's: |
Sending Cache-control Headers Using Apache 2.x and mod_expiresSubmitted by geekwisdom on Wed, 2006-03-29 12:44.
About a year ago I wrote about how use mod_header with Apache 1.3x to send Cache-control headers. It worked so well that I want to configure my Apache 2.x servers to send the same headers. It's even simpler with Apache 2.x since mod_expires is included in most default installs. Here's what I did. I added a configuration directive for the main server configuration (inside the Directory block) which sends the Cache-control header for common graphics. # cache common graphics for 3 days # cache CSS for 24 hours # set the default to 24 hours All that was left was to restart Apache and test everything. Testing was simple. I tailed the access log and made two requests for the same page. The first request resulted with a flurry of files being requested (all the graphics being downloaded). The second request resulted in a single file request (no graphics) and the graphics where logged as HTTP status 304 (unmodified), success. ( categories: Systems Administration )
|
Mozilla Project
Google SearchesGeek(Wisdom).com is not affiliated with google. We just like their search engine.
SyndicationFront Page Programming/Architecture Security/Privacy Systems Administration Old SiteLooking for the old, old site? 2008/07/08 22:18:18
|