How to GZip dictionaries? | Community
Skip to main content
mohanr80993572
Level 2
September 1, 2016
Solved

How to GZip dictionaries?

  • September 1, 2016
  • 5 replies
  • 2396 views

As we GZip CSS and JS files in AEM, we would like to GZip dictionaries (dict.en_US.json, dict.fr_US.json, etc) as well. How can we achieve that? Help would be greatly appreciated.

Thanks,

Mohan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

What you mean with "gzip", is the compression of the HTTP body; it is offered by the clientlibrary manager ootb for clientlibs, but AFAIK AEM is not using it for other files.

But your webserver (which also hosts the dispatcher) can do the compression on-the-fly as well, if you instruct it to do so (for example you should use mod_deflate for Apache HTTPD). This doesn't have negative impact on the performance of the site, but then also cached files benefit from this kind of compression.

But please note: Any HTTP client does this compression/uncompression transparently. So the files in the dispatcher cache are not compressed then.

Jörg

5 replies

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
September 1, 2016

Hi,

What you mean with "gzip", is the compression of the HTTP body; it is offered by the clientlibrary manager ootb for clientlibs, but AFAIK AEM is not using it for other files.

But your webserver (which also hosts the dispatcher) can do the compression on-the-fly as well, if you instruct it to do so (for example you should use mod_deflate for Apache HTTPD). This doesn't have negative impact on the performance of the site, but then also cached files benefit from this kind of compression.

But please note: Any HTTP client does this compression/uncompression transparently. So the files in the dispatcher cache are not compressed then.

Jörg

Level 2
September 1, 2016

Mohan Reddy wrote...

As we GZip CSS and JS files in AEM, we would like to GZip dictionaries (dict.en_US.json, dict.fr_US.json, etc) as well. How can we achieve that? Help would be greatly appreciated.

Thanks,

Mohan

 

Mohan,

Can you explain whats the use case here. Unlike CSS,JS which are used in the client browser the dictionaries are  consumed in the server side. The dictionaries keys referred in JSP/HTL (Sightly) get the value from the dictionary in the server side itself.

vijayraj

mohanr80993572
Level 2
September 2, 2016

Hi Jörg, thanks for the reply. Yeah, gzip I mean compression only. AEM doesn't compress files other than CSS, JS. Will try with webserver.

Mohan

mohanr80993572
Level 2
September 2, 2016

Vijayraj, we are using dictionaries' keys in javascript using Granite library. In this case dictionary json is generated. We are looking to compress these jsons.

Mohan

kautuk_sahni
Community Manager
Community Manager
September 5, 2016

Jörg Hoh wrote...

Hi,

What you mean with "gzip", is the compression of the HTTP body; it is offered by the clientlibrary manager ootb for clientlibs, but AFAIK AEM is not using it for other files.

But your webserver (which also hosts the dispatcher) can do the compression on-the-fly as well, if you instruct it to do so (for example you should use mod_deflate for Apache HTTPD). This doesn't have negative impact on the performance of the site, but then also cached files benefit from this kind of compression.

But please note: Any HTTP client does this compression/uncompression transparently. So the files in the dispatcher cache are not compressed then.

Jörg

 

Great suggestion Jörg (y).

Kautuk Sahni