Compress/Minify the HTML page ( not the js and css which can do by GZIp)

Avatar

Avatar
Validate 1
Level 2
ebin_Aby
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
ebin_Aby
Level 2

Likes

7 likes

Total Posts

25 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
ebin_Aby
Level 2

06-07-2020

I intend to compress/Minfy my HTML output so that the html size becomes less which increases the performance . 

 

eg : view-source:https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/getting-start... 

lots of white space if you see the source code . 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Nirmal_Jose
MVP

Likes

119 likes

Total Posts

207 posts

Correct reply

58 solutions
Top badges earned
Validate 1
Establish
Coach
Contributor
Shape 1
View profile

Avatar
Validate 1
MVP
Nirmal_Jose
MVP

Likes

119 likes

Total Posts

207 posts

Correct reply

58 solutions
Top badges earned
Validate 1
Establish
Coach
Contributor
Shape 1
View profile
Nirmal_Jose
MVP

06-07-2020

Hi @ebin_Aby ,

 

HTML compression needs to be implemented on your web server. If its Apache, you can use mod_deflate module. Please follow [1] for steps and [2] for documentation

 

[1] - https://knackforge.com/blog/karalmax/how-enable-gzip-compression-apache

[2] - https://httpd.apache.org/docs/2.4/mod/mod_deflate.html

Answers (3)

Answers (3)

Avatar

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
Vaibhavi
MVP

06-07-2020

Hi @ebin_Aby 

AEM OOTB doesn't have default option to minify html. 

Minification option is available for css /js by default . 

 

If you need to minify html output, you need to use html compression library which is custom implementation. 

There are many plugins are available to achieve the minification of html. One of the simplest is 

maven  html compression tag library, which you can import and use it for html minification. 

https://mvnrepository.com/artifact/com.googlecode.htmlcompressor/htmlcompressor/1.4

Or 

You can achieve the same towards apache layer as well. mod-pagespeed is one of the plugin which includes minification/compression of html along with other features which contribute to page performance. You can find more details in below article. 

https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

06-07-2020

I don't think so, removing whitespaces would make much difference in performance. If you have large pages in sizes then it may but for small pages, it may not.

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

06-07-2020

The following document may be helpful:

https://docs.adobe.com/content/help/en/experience-manager-64/developing/introduction/clientlibs.html...

 

Try rebuilding the clientlibs via File System, as per: https://helpx.adobe.com/ca/experience-manager/kb/How-to-force-a-recompilation-of-all-Sling-scripts-j...

 

* Moreover, what kind of errors do you see in the error.log file?