Cleaning html output from Web Datablade
Posted in 2004
Topics: General Discussion
Hi All, Not sure if this is the right place to ask but the output from our Web Datablades have a lot of whitespace and html comments - if I manually strip that out it comes down to less than half the original size. IMO that's a bandwidth savings that's worth the cpu cycles for, especially for the users with slow links. My question is - is there any way that I can get this done? I'm using Apache 1.3.22 with the web explode module. Regards, Josh. sending to informix-list
You can't do this in informix, something I've been pestering for since the blade was realised. The easiest way to achieve it is to rename the webexplode function and create your webexplode that takes the standard webexplode output and strips the whitespace. There are gotchas, you could end up removing whitespace that is required, I aim for blank lines and any whitespace prior to a tag, but this sometimes gives a problem, especially if you use the pre tag. If you are using webcaching then it's easier just have a background job checking the cache files, any new files throw a stripper at them. There is no validation on the cache files, it is assumed that they have not been altered. Josh Marshall wrote: > > Hi All, > > Not sure if this is the right place to ask but the output from our Web > Datablades have a lot of whitespace and html comments - if I manually strip > that out it comes down to less than half the original size. IMO that's a > bandwidth savings that's worth the cpu cycles for, especially for the users > with slow links. > > My question is - is there any way that I can get this done? I'm using Apache > 1.3.22 with the web explode module. > > Regards, > Josh. > sending to informix-list -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #