Orientation of specific files / folders for browser caching

Through research, I have not yet found a clear answer.

I know that you can configure headers for caching certain extensions, such as .jpg, .png, .js, etc. But where I have not found, is it possible to target a folder or a specific file in the cache of the client’s browser.

Here is our senario: we have massive sprites (in thousands of pixels) that contain most of the images on our site. We want to use local caching in the client browser, but at the same time we want to specify which folders or specific files the browser cache should use (and not just the general apache headers).

Is it possible? If so, what is the best way to implement it?

+4
source share
1 answer

Can this article help?

So you will have something like:

<Directory "/website/path/to/images"> .... and within here can target extensions too <FilesMatch "\.(gif|jpg|png)$"> ... </FilesMatch> </Directory> 
+4
source

All Articles