views:

35

answers:

2

If I set a far future expire header for this file (take note of the query string):

/css/getCSS.php?v=1284532156.css

Will it treat the entire URL (including the query string) as a single file and respect the expire deceleration, but request the next version of the file...

/css/getCSS.php?v=1284599999.css

...from the server as it won't have it in cache yet?

I'm not in a position where I can use .htaccess to mask / rewrite a file from /css/v156845156.css to /css/getCSS.php?v=v156845156.css and unsure whether including the unique file name in the query string will be sufficient to make the browser behave like any other, differently named files.

Cheers!

+2  A: 

Yes, and its a common way to work around cache control. If you use it the other way around that is.

Kristoffer S Hansen
Thanks for your super quick answer, but what do you mean by other way around?
ILMV
I think he means `/css/mycssfile.css?version=1234` where the `version` argument is just there to defeat cache (it's not used at all)...
ircmaxell
Ah I see :-), cheers
ILMV
Excactly @ircmaxwell :)
Kristoffer S Hansen
A: 

Yes this will change it, but why not just send the http-header Cache-Control?

I'd prefer not to modify the apache configuration, at the same time I'm not in a position where I can use `.htaccess`
ILMV
Because not all browsers or proxies respect the `Cache-Control` headers. (At least that has been my experience with temporal data written to flat xml files)...
ircmaxell
@ILMV you're using php. http://ca2.php.net/manual/en/function.header.php@ircmaxell That's for http/1.0 (1996).
Cheers for the link :-), have a major brain failure day today
ILMV