I have configured ETags (using ACS Commons ETag support) on my AEM server and disabled ETag on Apache. But once the file gets cached on the Dispatcher, Apache always returns 200 with response body instead of 304 Not modified. I have validated that the ETag value stored in the ".h" file and in the response is the same as the value of the "If-None-Match" header of the request.
If I remove the cached files from the dispatcher and resend the request then AEM correctly returns 304.
I have also disabled mod_deflate as I have found at some places that the deflate’s "-gzip" suffix could cause issues with ETag matching.
Also, instead of ETag, I have tried a similar thing with Last-Modified and If-Modified-Since headers. But no luck with that as well. I have noticed that we generally have Last-Modified headers in place in most cases and I have never seen 304. So, it seems like it is not a version-specific issue. I couldn’t find any configuration documentation related to this. Could someone please guide me where am I going wrong?
2
Answers
Check this https://issues.apache.org/bugzilla/show_bug.cgi?id=45023
I have enabled deflate
We don’t use Etags since it is diffcult to sync them across a cluster and Last Modified works fine.
You can adjust the timeouts accordingly, depending on your content.