aspose file tools*
The moose likes JSP and the fly likes shrink my jsp page response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "shrink my jsp page response" Watch "shrink my jsp page response" New topic
Author

shrink my jsp page response

Abhi Kedare
Greenhorn

Joined: Dec 10, 2010
Posts: 9
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

Joined: Jan 10, 2002
Posts: 61623
    
  67

Have you 100% determined that removing whitesapce will actually make a difference before going through all the trouble?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: shrink my jsp page response