Yeah, I had thought of that, but in most cases it is better to just filter throught the nodes you are using rather than the whole document. If the document is large, that might do the opposite of my origional intent, to speed up the rendering of the page.
The method I was thinking of was removing any new line feeds and spaces between my divs in the actual source code. @ acorbelli: I would not use that as my editing version but would design a code to sift through my pages to sqeeze them smaller, and there is a second advantage, faster transfer over the internet.
So you'd write the page, run it through this parser, and then upload it? (Or it is created on the web, but still run through the script before accessing).
Sounds neat, might be a little difficult to get the script to understand the difference between a space in your wording and whitespace though, wouldn't it? Unless you use a restrictive one, such as "only remove spaces/newlines if it is between /div and div tags".
Actually, that sounds like a challenge. Hmmm. Looks like I found my next random project.