I have page with static content (.jpg) mixed with server side cached content (.jpg too).
<body>
// Static content, "never change"
<img src="my_static_image.jpg">
// This image change every 6 hours, its name will not change.
<img src="changing_image.jpg">
<body>
I would like to optimize loading and refresing only the content that change, not the rest. In my case, changing_image.jpg keep the same name but is re-generated every 6 hours on serveur side.
<FilesMatch "/static/"> <-- this is regex, you can match by filename rather than by extention
Header set Cache-Control "max-age=29030400, public" <-- longer
</FilesMatch>
<FilesMatch "/changing/"> <-- this is regex, you can match by filename rather than by extention
Header set Cache-Control "max-age=21600, public" <--6 hours in seconds
</FilesMatch>