log
August 31, 2015 11:59AM
Following nginx configuration in a server block can cache js and css files with "js" or "css" as the end of the url.

location ~ .*\.(js|css)?$ {
expires 7d;
}

But it can't cache request such as:

http: //example.com/jquery.js?ver=1.11.3&build=1

or

http: //example.com/style.css?ver=4.3&build=1

Any way to cache cs/jss files above? Or cache files based on the file type of request instead of file name?
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: 239
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