Trimming white space and entra lines from the markup generated by WebSphere Application Serve

If you look at the HTML markup generated for IBM's default page you will notice that it has lot of white spaces and though they increase size of the response they are not required to display the page properly. If you set the custom property to true for your JSP engine, all of the white space and extra lines in the generated Java code are stripped out.

Take a look at the page which has two portlets and default IBM theme,

The page that gets generated is 64kb's in size and if you look at the view source you can see all the white spaces.

Now set equal to true as Web Container Custom property like this

Restart the server and try accessing the same page, you will notice that the size of the markup is reduced to 56.4 kb (Which is saving of close to 15 %) like this

The saving size could be much larger if your page is more complex.


Anonymous said...

This was a really a useful information. Thanks Sunil for sharing this.

Apps said...

Hi Sunil,
I tried this approach for removing the white spaces from the Portal response.
But I see not difference in the response even after making the changes. I restarted the Server twice, but no luck. My Portal is deployed on WAS Do I need to install any fix packs? Could you please help me?

Karan said...

Hi Apps,

You need to have WAS
I have WAS installed on my test environment.

I have WAS installed on my test environment.

I am not able to see white spaces in my Dev environment i.e

srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer

EG MEDI said... is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery

Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store