Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

shrink my jsp page response

 
Abhi Kedare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to shrink my jsp page text/html response as current page has lot more html code.
please give me solution for removing whitespace and carriage line feed for part of html code block or whole html code in jsp AT RUNTIME ( at the time of request response processing ) .
I just want decrease load time of my page


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you 100% determined that removing whitesapce will actually make a difference before going through all the trouble?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the servlet filter to compress your HTML. This reduces the amount of bandwidth used to transmit the page. Also make sure css and javascript is externalized.

Before you do this, you should make sure the time is coming from actually transmitting the page. If it takes 5 seconds to render your page and .2 seconds to transmit it, the improvement from shrinking the page won't help you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic