? ? ? Success

User tests: Successful: Unsuccessful:

avatar demis-palma
demis-palma
2 Feb 2018

When the compression of the response is delegated to Apache with mod_deflate, two headers are set during the compression:

Content-Encoding: gzip
Vary: Accept-Encoding

Vary: Accept-Encoding is important to prevent proxies, intermediate caches, or CDNs from serving compressed resource to clients that does not support compression and vice versa.
"Vary: Accept-Encoding" header specifies that caches should only be used if the incoming request matches the "Accept-Encoding" information in the cache.

When the mod_deflate is disabled in the web server, and the compression is delegated to Joomla through Global Configuration → Server → Gzip Page Compression, in this case the header "Content-Encoding: gzip" is set, but "Vary: Accept-Encoding" no, which causes the problem mentioned above on modern networks.

Testing Instructions

Disable mod_deflate in your web server and enable Joomla compression Global Configuration → Server → Gzip Page Compression.
Browse any page.
Check that the response headers include Vary: Accept-Encoding in addition to Content-Encoding: gzip

Note

See joomla-framework/application#79

avatar demis-palma demis-palma - open - 2 Feb 2018
avatar demis-palma demis-palma - change - 2 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Feb 2018
Category Libraries
avatar demis-palma demis-palma - change - 2 Feb 2018
The description was changed
avatar demis-palma demis-palma - edited - 2 Feb 2018
avatar demis-palma demis-palma - change - 2 Feb 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 Feb 2018
Category Libraries Libraries Unit Tests
avatar ggppdk
ggppdk - comment - 2 Feb 2018

It is not only about older browser seeing corrupted HTML

There is 1 more reason to add this
and thus have proxies, etc store both compressed and uncompressed version

If an old browser (or some browser) is the first to request a content as uncompressed

then the proxy will cache only the uncompressed content
and it will serve it to browsers that can accept compressed content
thus having worst responce time

avatar viocassel viocassel - test_item - 2 Jul 2019 - Tested successfully
avatar viocassel
viocassel - comment - 2 Jul 2019

I have tested this item successfully on a07e67d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19525.

avatar viocassel
viocassel - comment - 2 Jul 2019

I have tested this item successfully on a07e67d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19525.

avatar SharkyKZ
SharkyKZ - comment - 12 Aug 2019

I have tested this item successfully on a07e67d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19525.

avatar SharkyKZ SharkyKZ - test_item - 12 Aug 2019 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Aug 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Aug 2019

Status "Ready To Commit".

avatar HLeithner
HLeithner - comment - 17 Sep 2019

It took some time but thanks for adding this header to Joomla.

avatar HLeithner HLeithner - change - 17 Sep 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-09-17 16:21:22
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 17 Sep 2019
avatar HLeithner HLeithner - merge - 17 Sep 2019

Add a Comment

Login with GitHub to post a comment