On a Debian Jessie installation, I manually installed wordpress and edited .htaccess
, turning mod_expires on:
ExpiresActive On
ExpiresDefault modification
However, when I use Firefox Inspector to watch network traffic, I find all the js and css files return 200 OK with gzip-compressed content instead of HTTP 304.
Then I did some experiment.
- I created an almost empty (incompressible) file named
foobar.css
and browse it in firefox. It returned200 OK
with uncompressed data on the first time and304 Not Modified
the second time. - I repeated the same content several times to create a large (compressible) file. This time the server returned
200 OK
with compressed data on the first time, the second time, the third time... Every time it returns the same content instead of the expected304 Not Modified
.
I watched /etc/apache2/mods-enabled/deflate.conf
and found that text/css
is deflated by default:
...
AddOutputFilterByType DEFLATE text/css
...
Can the two modules mod_expires and mod_deflate work at the same time? How should I configure them?
Terribly sorry for broken English.
EDIT: I have found a workaround here: https://bz.apache.org/bugzilla/show_bug.cgi?id=45023#c22 However, it is only a workaround. I think it's really a server bug.