I agree with the Filter suggestion, but I would take a step back and ask
whether you *really* need to do this.

Trimming the excess whitespace won't really make much difference to the size
of the downloaded page and adding the Filter processing could even make it
slower, not faster to load.

If you're really producing pages that are too large I would first consider
the following optimizations before worrying about trimming whitespace:

 - Reduce the number and size of images in the page
 - Convert the page layout to use CSS instead of nested tables (this alone
can reduce the page weight by as much as 50%)
 - Split the page into smaller, lighter pages.


Steve


> -----Original Message-----
> From: James Mitchell [mailto:[EMAIL PROTECTED]
> Sent: October 20, 2003 11:40 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Trimming the extra spaces in the output page
>
>
> Someone mentioned this a few weeks back.  I don't remember the solution,
> but if it were my job to make this happen, I would most likely use a
> Filter.
>
>  http://java.sun.com/products/servlet/Filters.html
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017
> AIM:jmitchtx
>
>
>
>
> > -----Original Message-----
> > From: EL AKARI Mehdi [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 20, 2003 1:34 PM
> > To: Struts Users Mailing List
> > Subject: Trimming the extra spaces in the output page
> >
> >
> > Hi,
> > I'm trying to optimise the size of the output pages of a
> > struts application.
> > The first thing that i'm trying to do is to trim the extra
> > spaces and carriage returns in the output page.
> > Do you have any ideas of how to do this?
> > If you have any suggestions of how to optimise the page
> > output they are welcome!
> > Thanks
> > Mehdi
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to