Jump to content

nginx leverage browser caching?


Recommended Posts

Posted

got some issue after using online tools like webpagetest and pagespeed insight my server still doesnt cache static files that long

did i do something wrong on the config?

HTTP/1.1 200 OK
Server: nginx
Content-Type: image/jpeg
Connection: keep-alive
Date: Mon, 07 Sep 2015 08:02:21 GMT
Expires: Mon, 07 Sep 2015 08:07:21 GMT
Cache-Control: max-age=300
Last-Modified: Tue, 01 Sep 2015 08:50:41 GMT

 

 

server
{

location ~*  \.(jpg|jpeg|png|gif|ico|css|js|woff)$ {
        expires 365d;
    }
if (!-e $request_filename)
{
rewrite "^/(.*)$" "/forum/public/404.php";
}
if (!-e $request_filename)
{
rewrite "^/(.*)$" "/forum/index.php";

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...