Welcome! Log In Create A New Profile

Advanced

Re: Set cache expiration based on request filename

Adnan RIHAN
March 31, 2012 11:58AM
I think you want to use "location" directive, and an expires inside ;)

--
Cordialement, Adnan RIHAN.
Président-Fondateur de l'association Virtual-Info (Loi 1901),
hébergement Web et Serveurs de jeux.
Technicien-Supérieur développeur d'applications Web et Système.
3e année à {Epitech}.
Envoyé de mon iPhone 

Le 31 mars 2012 à 17:52, Micah Carrick <micah@quixotix.com> a écrit :

Hey folks,

My Django website uses a subdomain to serve static content and as such I
have 'expires' set to max. However, there is now one image on that domain
that get's re-generated every 10 minutes. How would I go about forcing just
that one filename to NOT be cached by the browser?

This is what I have:

server {
listen 80;
listen 443;
ssl on;
server_name static.example.com;
expires max;
add_header Cache-Control public;
access_log off;
root /home/username/public_html/static.example.com/;
}

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Set cache expiration based on request filename

Micah Carrick March 31, 2012 11:54AM

Re: Set cache expiration based on request filename

Adnan RIHAN March 31, 2012 11:58AM

Re: Set cache expiration based on request filename

Micah Carrick March 31, 2012 12:30PM

Re: Set cache expiration based on request filename

Duane Mulder March 31, 2012 04:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 236
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready