Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render GSP view as compact html file

I have gsp view files wherein tags are formatted for readability with whitespaces. I am expected to remove those so that the rendered html file is compact. So, is there a way in grails using plugin or any other means that I can tell grails to remove the whitespaces/newlines between tags and generate a compact view? I dont want to remove them from gsp file itself but only from the html file rendered by grails.

like image 624
Sumit Shrestha Avatar asked Sep 11 '13 07:09

Sumit Shrestha


1 Answers

If the goal is to go easy on network transfer, enable the Spring Boot compression (gzip) in application.yml

server:         compression:         enabled: true         mime-types: application/json,application/xml,text/html,text/xml,text/plain,text/css,application/javascript 
like image 52
bassmartin Avatar answered Oct 03 '22 20:10

bassmartin