Hey guys,
We are trying to integrate ngx_pagespeed in our service.
Currently all is working fine, except
resize_rendered_image_dimensions filter.
At first, if I go to the main page of the site serveral times, images will resize as expected (to the actual rendered width).
But If I visit the same page about 10 minutes later, images are not optimized at all (no X-Page-Speed header).
Why is this happinig? Does the cache clear in some way? How to prevent this behaviour?
May be its because our dev server has small amount of RAM?PageSpeed Insights test warn me that images are not optimized too.
If I run test several times in 30 seconds interval (because of cache test results), I still get warnings.
After
I go to the page by myself, and then run test, there is no warning, but
only in section of the device I used (desktop or mobile).
Does ngx_pagespeed aware of the device user use? How does it hadle images resize in this way?Our current ngx_pagespeed config looks like this:
Main domain:
pagespeed on;
pagespeed FileCachePath "path_to_cache";
pagespeed EnableFilters rewrite_images;
pagespeed EnableFilters extend_cache;
pagespeed EnableFilters resize_rendered_image_dimensions;
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
pagespeed Domain *-static.staging.sellios.net;
Domain wich serve static files:
pagespeed on;
pagespeed FileCachePath "path_to_cache";
pagespeed EnableFilters rewrite_images;
pagespeed EnableFilters extend_cache;
pagespeed EnableFilters resize_rendered_image_dimensions;
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
You can see and test our
dev build here.