O
O
Outsider V.2015-02-14 00:56:39
Apache HTTP Server
Outsider V., 2015-02-14 00:56:39

How to make Etag and Gzip friends?

Hello.
Apparently, an ancient problem, but I never found a normal solution.
In .htaccess I have the following lines:

<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE application/xml
</IfModule>
FileETag MTime

After enabling GZip in this way for the above extensions, the server returns an ETag prefixed with -gzip. For example this response:

HTTP/1.1 200 OK
Date: Fri, 13 Feb 2015 07:29:38 GMT
Server: Apache
Last-Modified: Thu, 12 Feb 2015 12:40:17 GMT
ETag: "50ee36c1a3bce -gzip "
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Cache-Control: no-cache
Content-Length: 2724
Keep-Alive: timeout=2, max=99
Connection: Keep-Alive
Content-Type: text/css

Because of this, the If-None-Match header does not work (checked with the https://redbot.org service ). If I disable Gzip, then everything is in order.
Is there any way to use Etag and Gzip together normally?
PS The site is still under development, I'm testing it on a free Hostinger account.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Insayt, 2017-10-12
@Insayt

Import the variable file into each file where they are needed.
Now, most likely, the trouble is due to the fact that the styles are collected according to the mask app/sass/**/*, because of this, the files are taken in the order in which the gallp wants, so it can compile any file before it finds the file with variables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question