php - How to force a refresh with header? -


i have web page displays user uploaded images. images cached long max-age such users not need retrieve them server every time view page. however, creates problem when user starts replace images (the file names in serial numbers 01.jpg, 02.jpg, etc). user still see old images after upload unless clicks refresh button.

is there way (without appending query string images) force hard refresh upon redirection page after upload? currently, using php header function redirection:

header("location: //$host/user/$id"); 

this depends on caching mechanism. if want control on when browser should cache-bust (without fingerprinting) need set must-revalidate (so no caching). comes @ performance loss. can semblance of caching using etags , 304 not modified overhead of request might bad.

you can't make request busts cache on other resource, that's not how web works.


i recommend using fingerprinting. there reason don't want use it?


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -