• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Enable ETag support for CSS [Deleted]


Well-known member
Marcus submitted a new resource:

Enable ETag support for CSS - Adds an ETag HTTP header to XenForos CSS Files

Adds an Etag for XenForos CSS Files

More information about Etags:

This addon works when you let php compress its output. To achieve this:
1. disable gzip compression from your webserver (apache, nginx)
2. gzip compression enabled in library/config.php:
$config['enableGzip'] == true;
Read more about this resource...


Well-known member
This happens when the webserver compresses the output: When php adds the ETag header and then passes the content (webpage) to your webserver, the webserver compresses the webpage . So the file the webserver serves (php.gz) is different from the file php passes to the webserver (php). In that case the webserver decides that the content of both versions is different, though the passed ETag header that gives a fingerprint to the php version is not the correct fingerprint tot he php.gz version. Because of that, the webserver removes the ETag header.

But when php adds the ETag header, compresses the file, and passes the php.gz to the webserver along with an ETag, the webserver does not touch the ETag and passes it along with the content and other headers back to the client browser. It doesn't even matter whether php adds a fingerprint to the php file or the php.gz file, because the webserver has no idea whether the fingerprint is about the php file, the php.gz file or whether it is a real fingerprint at all: the ETag could also be named like "todayisasunnyday", there is no other rule for creating the ETag other than it should make a single webpage distinguishable from another version.

Because of that, the webserver should not compress php files.