Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

W3T Browser Cache Settins for Nginx

By: rhandom on Dec 22nd, 2012  |  syntax: Bash  |  size: 0.90 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # BEGIN W3TC Browser Cache
  2. gzip on;
  3. gzip_types text/css application/x-javascript text/x-component text/richtext image/$
  4. location ~ \.(css|js|htc)$ {
  5.     expires 31536000s;
  6.     add_header Pragma "public";
  7.     add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-rev$
  8.    add_header X-Powered-By "W3 Total Cache/0.9.2.4";
  9. }
  10. location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
  11.    expires 3600s;
  12.    add_header Pragma "public";
  13.    add_header Cache-Control "max-age=3600, public, must-revalidate, proxy-revalid$
  14.     add_header X-Powered-By "W3 Total Cache/0.9.2.4";
  15. }
  16. location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|$
  17.     expires 31536000s;
  18.     add_header Pragma "public";
  19.     add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-rev$
  20.    add_header X-Powered-By "W3 Total Cache/0.9.2.4";
  21. }
  22. # END W3TC Browser Cache
clone this paste RAW Paste Data