Skip to content

Instantly share code, notes, and snippets.

@yendor
Created February 26, 2009 11:22
Show Gist options
  • Save yendor/70803 to your computer and use it in GitHub Desktop.
Save yendor/70803 to your computer and use it in GitHub Desktop.
<Proxy *>
SetOutputFilter DEFLATE
</Proxy>
<Location />
# GZIP COMPRESSION.
# For all browsers turn on html, css and javascript gzip compression
# For old browsers turn OFF all gzip compression
# For IE6 gzip html only
# Allow gzip compression for html, css, and javascript
AddOutputFilterByType DEFLATE text/html text/javascript text/css application/x-javascript
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Mozilla, but it is fine
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html
# Turn off gzip for images, pdf, zips and swfs
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.zip$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.swf$ no-gzip dont-vary
</Location>
<LocationMatch "\.(css$|js$)">
# Far Future Expires for Javascript and CSS
Header set Expires "Thu, 15 Apr 2020 20:00:00 GMT"
</LocationMatch>
<Location />
Header unset ETag
FileETag None
#Header append Vary User-Agent env=!dont-vary
Header set Cache-Control "private"
</Location>
With Empty Cache (component not cached)
GET Request for component
With Primed Cache (component is cached)
Has Far Futures Expires Header
- Browser finds in cache
- Determines not stale
- Reads from local cache
No FFE
- Does NOT have Far Future Expires Header
- Browser finds in cache
- Determines it is “stale” (expired)
- Makes a Conditional GET
- If it has not changed
- Reads from Local Cache
- If it has changed
- Performs a GET Request
http_port 192.168.1.11:80 accel defaultsite=interspire-site
cache_peer 127.0.0.1 parent 80 0 no-query originserver name=myAccel
acl our_sites dstdomain interspire-site
http_access allow our_sites
cache_peer_access myAccel allow our_sites
cache_peer_access myAccel deny all
# Reboot after 15 seconds if there is a kernel panic
kernel.panic = 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment