Welcome! Log In Create A New Profile

Advanced

Re: How to cache js/css request containing a question mark?

B.R.
September 02, 2015 03:08AM
You will need to be a little bit more specific than 'this is not working'
to get some help.
http://www.catb.org/esr/faqs/smart-questions.html

Btw, the documentation show the default value for proxy_cache_key if none
is provided, and it already takes arguments (and thus arguments' separator)
into account:
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_key
http://nginx.org/en/docs/http/ngx_http_core_module.html#var_request_uri
---
*B. R.*

On Wed, Sep 2, 2015 at 8:40 AM, log <nginx-forum@nginx.us> wrote:

> Well, unfortunately this is not working...
>
> http://example.com/style.css?ver=4.3
> http://example.com/jquery-migrate.min.js?ver=1.2.1
>
>
> biazus Wrote:
> -------------------------------------------------------
> > Please try to remove $ in the end of the expression:
> >
> > something like this:
> >
> > location ~ .*\.(js|css) {
> > expires 7d;
> > }
> >
> > Also, make sure you are using args in the cache key:
> >
> > proxy_cache_key "$host$uri$is_args$args";
> >
> > Regards,
> > Biazus
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,261338,261374#msg-261374
>
> _______________________________________________
> 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

How to cache js/css request containing a question mark?

log August 31, 2015 11:59AM

Re: How to cache js/css request containing a question mark?

biazus August 31, 2015 12:57PM

Re: How to cache js/css request containing a question mark?

log September 01, 2015 11:18PM

Re: How to cache js/css request containing a question mark?

log September 02, 2015 02:40AM

Re: How to cache js/css request containing a question mark?

B.R. September 02, 2015 03:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 319
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