You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
I'm using nginx 1.8.1 with ngx_pagespeed 1.10.33.2 on Debian 8.4, running Linux 3.16 on a x64 VM.
I'm having a problem where after purging the cache for a file, any subsequent requests will return a old version of the file without any filters applied.
root@mybox:/var/www/htdocs# cat scripts.js
// Some comment
// Another comment
stuff.that('looks', {"like": 'a script'});
alert('some alert');
root@mybox:/var/www/htdocs# cat request.txt
GET /scripts.js HTTP/1.1
Host: mysite.com
Not sure if it's related to this issue, but if I make the request three times, I get three different responses; after the third request the response seems to stay more or less the same. Starting with the third request, the file is rewritten, so clearly ngx_pagespeed is active, but I'm intrigued by the missing X-Page-Speed header.
As you can see, it serves the non-rewritten old version of the file. It will continue serving the old version without rewriting it for a while (I believe it's 5 minutes, just like the Expires header suggests), after that it will start serving and rewriting the new version.
What could be causing this issue and how to I fix it? Also, why is the X-Page-Speed header missing and why is the Vary header sent twice?
server {
listen 80;
listen [::]:80;
root /var/www/htdocs;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name mysite.com;
##
# Pagespeed Settings
##
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
}
The text was updated successfully, but these errors were encountered:
Thanks for the amazingly clear bug report! I was able to reproduce this without much effort, it does indeed look like a bug. I'll poke at it a bit more.
The duplicate Vary headers were at least partially fixed in our latest beta. You might want to upgrade and see if that solves that particular problem.
I'm using nginx 1.8.1 with ngx_pagespeed 1.10.33.2 on Debian 8.4, running Linux 3.16 on a x64 VM.
I'm having a problem where after purging the cache for a file, any subsequent requests will return a old version of the file without any filters applied.
Not sure if it's related to this issue, but if I make the request three times, I get three different responses; after the third request the response seems to stay more or less the same. Starting with the third request, the file is rewritten, so clearly ngx_pagespeed is active, but I'm intrigued by the missing X-Page-Speed header.
Now, trying to change the contents of the file and purging the cache produces the problem:
As you can see, it serves the non-rewritten old version of the file. It will continue serving the old version without rewriting it for a while (I believe it's 5 minutes, just like the Expires header suggests), after that it will start serving and rewriting the new version.
What could be causing this issue and how to I fix it? Also, why is the X-Page-Speed header missing and why is the Vary header sent twice?
Here's my configuration:
nginx http block:
This is my server block:
The text was updated successfully, but these errors were encountered: