Can I use SetOutputFilter DEFLATE without leaving a cached copy?

2

I know that SetOutputFilter DEFLATE is meant to compress the file to be received by the browser. I used this in my .htaccess to reduce the loading time of the data.js file.

<FilesMatch "^(dados)\.js$">
SetOutputFilter DEFLATE
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Fri, 22 Aug 1980 22:08:00 GMT"
</FilesMatch>

The first part works the file is sent to the faster browser already in header set cache-control no-cache is ignored.

    
asked by anonymous 26.01.2016 / 15:44

1 answer

0

Yes it is possible and it is exactly the way you did it. How did you test it? using exactly your rules in my .htaccess copy blocking in the cache works perfectly.

See the result only using the code you provided in the question:

TheCache-Controlrulesarethereinheadersexactlyasdefinedin.htaccess,andthereturnedStatusCodeisalways200OK,nomatterhowmanyreloadsonthepageImake,whichindicatesthatthefileisalwaysbeingservedfromtheserver(youwouldreceive304incaseoflocalcache).

Asanextra,youcantakealookhere 100% cache prevention for files , but the only additional rule shown is% pragma% which is somewhat obscure for a long time and in practice should not change anything.

    
09.02.2016 / 18:43