indikatordesign

Browser Caching Nginx

Jan 23rd, 2017
145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gzip_proxied any;
  2. location ~* \.(css)$ {
  3.     expires 31536000s;
  4. }
  5. location ~* \.(atom)$ {
  6.     expires 3600s;
  7. }
  8. location ~* \.(json)$ {
  9.     expires 0s;
  10. }
  11. location ~* \.(xml|xsl|xsd)$ {
  12.     expires 0s;
  13. }
  14. location ~* \.(xml|rss)$ {
  15.     expires 0s;
  16. }
  17. location ~* \.(ico)$ {
  18.     expires 604800s;
  19. }
  20. location ~* \.(html|htm|shtml)$ {
  21.     expires 0s;
  22. }
  23. location ~* \.(js|jsonp)$ {
  24.     expires 31536000s;
  25. }
  26. location ~* \.(js)$ {
  27.     expires 31536000s;
  28. }
  29. location ~* \.(webapp)$ {
  30.     expires 0s;
  31. }
  32. location ~* \.(appcache|manifest)$ {
  33.     expires 0s;
  34. }
  35. location ~* \.(oga|ogg|spx)$ {
  36.     expires 2592000s;
  37. }
  38. location ~* \.(gif)$ {
  39.     expires 2592000s;
  40. }
  41. location ~* \.(jpeg|jpg)$ {
  42.     expires 2592000s;
  43. }
  44. location ~* \.(png)$ {
  45.     expires 2592000s;
  46. }
  47. location ~* \.(svg|svgz)$ {
  48.     expires 2592000s;
  49. }
  50. location ~* \.(webp)$ {
  51.     expires 2592000s;
  52. }
  53. location ~* \.(mp4|m4v|f4v|f4p)$ {
  54.     expires 2592000s;
  55. }
  56. location ~* \.(ogv)$ {
  57.     expires 2592000s;
  58. }
  59. location ~* \.(webm)$ {
  60.     expires 2592000s;
  61. }
  62. location ~* \.(eot)$ {
  63.     expires 2592000s;
  64. }
  65. location ~* \.(otf)$ {
  66.     expires 2592000s;
  67. }
  68. location ~* \.(ttf|ttc)$ {
  69.     expires 2592000s;
  70. }
  71. location ~* \.(woff)$ {
  72.     expires 2592000s;
  73. }
RAW Paste Data