Welcome! Log In Create A New Profile

Advanced

browser cache expiry is missing

Posted by Thorsten-R 
browser cache expiry is missing
November 29, 2016 02:56PM
for google pagespeed i need browser cache expiry dates for the pictures.

all pictures i want to cache are in the directory:
https://www.rittinghaus-invest.de/media/image/*/*/*/picturename.jpg

i have directive:
## All static files will be served directly.
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|html)$ {
## Defining rewrite rules
rewrite files/documents/.* /engine last;
rewrite backend/media/(.*) /media/$1 last;

expires 1w;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";

tried also this one without success:

# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 326
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready