Removing spaces (white-spaces) generated by opencms or JAVA applications

Dificuldade    

Hello everyone!

Sorry for several days without posting but on the other hand today I will post another great way to improve the performance of your website be it based on opencms or java!

You implement your beautiful and elegant code, removes all spaces, indents everything and when you inspect the source code:

espaços

WTF? hahaha! If you also care about quality and speed of your work here is the solution in just two steps.

1) Enter this code in your web.xml

Note: If the project is OpenCms you should enter after:

1-1) Enter this code below inside <jsp-config>:

2) Now in your JSP file enter the code below:

Ready! Now just clean the cache of your application and inspect the code again!

You will see the code without spaces and rendering much faster in your browser!

I hope it helped you!

Hugs