User Tools

Site Tools


Disable cacheing of files with certain extension in apache

Enable headers module:

a2enmod headers

In vhost config add:

<filesMatch ".(apk)$">
      Header set Cache-Control "no-store, no-cache, must-revalidate"

This sends a header field to browser instructing it not to cache files ending with .apk.

Restart apache:

service apache2 restart

Tested on

See also


wiki/disable_cacheing_files_certain_extension_apache.txt · Last modified: 2022/09/19 23:49 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki