adding white spaces in page view source | Community
Skip to main content
Level 3
September 8, 2018
Solved

adding white spaces in page view source

Hi Team,

I have code like below screen shot

if there is any sly tag in code it is creating white space in page view source like below

Are there any ways to remove the white spaces.

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Employee
September 10, 2018

This is Sling issue.

Here it is -issue: [SLING-4443] Whitespace removal for Sightly HTML output - ASF JIRA

It is still open.

Kautuk Sahni

5 replies

Level 3
September 10, 2018

Hi All,

Thanks for your response.

Can't we remove the white lines by using ContentBinder ? if yes suggest me how to proceed.

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Employee
September 10, 2018

This is Sling issue.

Here it is -issue: [SLING-4443] Whitespace removal for Sightly HTML output - ASF JIRA

It is still open.

Translate
Kautuk Sahni
Level 2
July 4, 2024

Hi @kautuk_sahni - Is this issue still open? Do we have a solution to it?

Translate
joerghoh
Employee
September 9, 2018

I don't see any white spaces being added, but rather new lines.

Jörg

Translate
arunpatidar
New Participant
September 8, 2018

Hi,

This extra space won't make any impact on HTML rendering. Removing white spaces won't be making any difference and will be add extra overhead to remove white spaces either using javascript/jquery or sling output rewrite.

I suggest, let it be.

If you want to know more about white spaces in HTML, go through with https://medium.com/@patrickbrosset/when-does-white-space-matter-in-html-b90e8a7cdd33

Translate
Arun Patidar