Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to GZip dictionaries?

Avatar

Avatar
Validate 1
Level 2
mohanr80993572
Level 2

Likes

2 likes

Total Posts

24 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
mohanr80993572
Level 2

Likes

2 likes

Total Posts

24 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
mohanr80993572
Level 2

01-09-2016

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,115 likes

Total Posts

3,149 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,115 likes

Total Posts

3,149 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

01-09-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

Answers (4)

Answers (4)

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,164 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,164 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

04-09-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).

Avatar

Avatar
Validate 1
Level 2
mohanr80993572
Level 2

Likes

2 likes

Total Posts

24 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
mohanr80993572
Level 2

Likes

2 likes

Total Posts

24 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
mohanr80993572
Level 2

02-09-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

Avatar

Avatar
Validate 1
Level 2
mohanr80993572
Level 2

Likes

2 likes

Total Posts

24 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
mohanr80993572
Level 2

Likes

2 likes

Total Posts

24 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
mohanr80993572
Level 2

02-09-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

Avatar

Avatar
Validate 1
Level 2
vijayraj_vk
Level 2

Likes

0 likes

Total Posts

21 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Affirm 3
Affirm 1
View profile

Avatar
Validate 1
Level 2
vijayraj_vk
Level 2

Likes

0 likes

Total Posts

21 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Affirm 3
Affirm 1
View profile
vijayraj_vk
Level 2

01-09-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