HTML de-bloater
-
I'm like alot of the others and use Notepad. I use the following tool to trim whitespace and such after my page is working properly: http://www.serpik.com/ahc/ Just make sure you keep master copies. My 20 favorite films:
http://www.ymdb.com/user_top20_view.asp?usersid=8912OOH! The Manchurian Candidate! Good one! ;-)
-
basementman wrote: strip out all of the unnecessary spaces and tabs :omg: Just don't do that with the copy you're going to be working on!!! Also, IMHO with computer-generated HTML, it's all those extra <font> tags that really hog space. Reduce them to only the necessary ones, and you've cut the file's size to ¼ the size. I guess I'm a hardcore programmer - I never use HTML designers, and I always head straight for the SQL view in the MS Access query designer.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhijdunlap wrote: Also, IMHO with computer-generated HTML, it's all those extra <font> tags that really hog space. Reduce them to only the necessary ones, and you've cut the file's size to ¼ the size. :omg: You use font tags? In the name of God I command you to stop! Go learn CSS!
Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing
-
You want a HTML optimiser? Something that looks at your code and goes "those tags are unnecesary, strip them out"? I don't think beyond the most basic level that exists or is possible. If it were do you think I would spend days doing HTML templates with CSS and what not. I would rather use FP, produce a TABLE layout and have HTML Optimiser go and re-write it all nicely for me. :) You do get tools to rip out all the tags Office puts into HTML. Not sure if you get the same thing for the crap that FP outputs, but I doubt it as it is not a simple case like Office HTML. Learn HTML and code by hand, only way you will produce clean code at this present point. Dreamweaver is getting there, but no cigar yet.
Paul Watson
Bluegrass
Cape Town, South AfricaRobert Edward Caldecott wrote: My father-in-law calls yer man bits "weasels"
Well if you could get a browser to render it and then write it out to a file, this way it would be "reinterpeting" the page, and the result would be optimized, becuase it wouldn't be putting a font tag after everyletter, unless the font kept changing. -Steven "the yellow dart" Hicks
CPA
CodeProjectAddict
Actual Linux Penguins were harmed in the creation of this message.
More tutorials: Ltpb.8m.com: Tutorials |404Browser.com (Download Link)
-
Well if you could get a browser to render it and then write it out to a file, this way it would be "reinterpeting" the page, and the result would be optimized, becuase it wouldn't be putting a font tag after everyletter, unless the font kept changing. -Steven "the yellow dart" Hicks
CPA
CodeProjectAddict
Actual Linux Penguins were harmed in the creation of this message.
More tutorials: Ltpb.8m.com: Tutorials |404Browser.com (Download Link)
I am not sure if I am following your logic Steven, could you explain a bit more please?
Paul Watson
Bluegrass
Cape Town, South AfricaRobert Edward Caldecott wrote: My father-in-law calls yer man bits "weasels"
-
jdunlap wrote: Also, IMHO with computer-generated HTML, it's all those extra <font> tags that really hog space. Reduce them to only the necessary ones, and you've cut the file's size to ¼ the size. :omg: You use font tags? In the name of God I command you to stop! Go learn CSS!
Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing
I don't use font tags, but many WYSIWYG editors do. If I used <font> tags I'd have gone mad by now.* I use a good ol' external CSS file. *Imagine updating 1000+ <font> font tags by hand just because you wanted to change the font size. :omg: X|
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Paul Watson wrote: Learn HTML and code by hand All good advice as long as you don't want to use the ASP.NET web controls. <dark looks in the direction of Redmond> cheers, Chris Maunder
Chris, What problem are you having with the APS.NET controls? I don't like how hard they are to use in the VS.NET designer especially the Panel control but I work around this by using Tables to control my layout. The controls themselves appear to render just fine although I've seen some problem with them rendering against NS 4.x. but then they would also have problems rendering against IE 4.x
-
I am not sure if I am following your logic Steven, could you explain a bit more please?
Paul Watson
Bluegrass
Cape Town, South AfricaRobert Edward Caldecott wrote: My father-in-law calls yer man bits "weasels"
Well the browser translates the HTML "code" into something visual it could regenerate what was translated and displayed back into code (which would be smaller, and not resulting in <font color="blue">h</font>he<font color="black">ll</font>o world). -Steven "the yellow dart" Hicks
CPA
CodeProjectAddict
Actual Linux Penguins were harmed in the creation of this message.
More tutorials: Ltpb.8m.com: Tutorials |404Browser.com (Download Link)
-
OOH! The Manchurian Candidate! Good one! ;-)
The scene where the GIs are brainwashed to think they're in New Jersey is one of my favorite scenes of any film.
My 20 favorite films:
http://www.ymdb.com/user_top20_view.asp?usersid=8912 -
Well the browser translates the HTML "code" into something visual it could regenerate what was translated and displayed back into code (which would be smaller, and not resulting in <font color="blue">h</font>he<font color="black">ll</font>o world). -Steven "the yellow dart" Hicks
CPA
CodeProjectAddict
Actual Linux Penguins were harmed in the creation of this message.
More tutorials: Ltpb.8m.com: Tutorials |404Browser.com (Download Link)
I hear what you are saying. When IE parses the HTML document it must convert
style="color: red"
into something which Windows can understand and display. Also I assume it builds up a "tree" of the code. Now, it would be nice to think IE optimises that tree, detects redudnant styles and bits and excludes them. But does it? Also if you have ever used the DOM in IE to access the innerHTML property of an element you will see the pure and utter tripe that IE returns. It even takes wonderfully coded HTML and spits out rubbish (not knocking Chris at all but go to the submission wizard and using the nice new WYSIWYG editor put in some good HTML. Then swap to WYSIWYG view, then swap back to HTML view... You see what it does? Uppercases elements, rips out quotes, puts in FONT tags and what not. That is IE doing it! Shocking.) Redundant tags are fine, even I could probably write a parser that figured out redundant tags. It is when someone uses a TABLE instead of a DIV or a SPAN instead of a LABEL that it must become damned hard to write an optimiser. Also how does an optimiser "see" what the developer is trying to produce and then re-write the code to make it happen? Really, I don't think currently that can be done.Paul Watson
Bluegrass
Cape Town, South AfricaRobert Edward Caldecott wrote: My father-in-law calls yer man bits "weasels"
-
Short question: Does anybody know of a good HTML debloater that can strip useless HTML code? Long reason: I happen to be a Frontpage fan. I'm rewriting my site from scratch using FP, and the only gripe I have with it is that it produces incredibly bloated HTML code. It doesn't rub well with those on dialup, like me. On a related note: Following CP advice, I decided to try out Dreamweaver MX. I have 25 more days to go before the trial version expires and it can prove to me that it doesn't suck. So far, it's losing - badly. If I can't get my hands on a debloater, I'll have to do it by hand. X| TIA,
Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking. -
You may want to check out this tool: HTML TIDY Sounds like it might do just what you need... :)
Shog9
drifting along with the tumbling tumbleweeds...
-
I hear what you are saying. When IE parses the HTML document it must convert
style="color: red"
into something which Windows can understand and display. Also I assume it builds up a "tree" of the code. Now, it would be nice to think IE optimises that tree, detects redudnant styles and bits and excludes them. But does it? Also if you have ever used the DOM in IE to access the innerHTML property of an element you will see the pure and utter tripe that IE returns. It even takes wonderfully coded HTML and spits out rubbish (not knocking Chris at all but go to the submission wizard and using the nice new WYSIWYG editor put in some good HTML. Then swap to WYSIWYG view, then swap back to HTML view... You see what it does? Uppercases elements, rips out quotes, puts in FONT tags and what not. That is IE doing it! Shocking.) Redundant tags are fine, even I could probably write a parser that figured out redundant tags. It is when someone uses a TABLE instead of a DIV or a SPAN instead of a LABEL that it must become damned hard to write an optimiser. Also how does an optimiser "see" what the developer is trying to produce and then re-write the code to make it happen? Really, I don't think currently that can be done.Paul Watson
Bluegrass
Cape Town, South AfricaRobert Edward Caldecott wrote: My father-in-law calls yer man bits "weasels"
Well I created an XML Editor last summer (which now I don't have the source code to anymore due to an nefarious XP+ZoneAlarm crash during linking), but it parsed the XML document in to a tree when it was opened, when it had been modified and saved then it recreated the XML file, but without the unneeded spaces between tags etc. -Steven "the yellow dart" Hicks
CPA
CodeProjectAddict
Actual Linux Penguins were harmed in the creation of this message.
More tutorials: Ltpb.8m.com: Tutorials |404Browser.com (Download Link)
-
Chris, What problem are you having with the APS.NET controls? I don't like how hard they are to use in the VS.NET designer especially the Panel control but I work around this by using Tables to control my layout. The controls themselves appear to render just fine although I've seen some problem with them rendering against NS 4.x. but then they would also have problems rendering against IE 4.x
The ASP controls output appalling HTML. Take a table, give it a border of 1 and take a look at the output. I can guarantee it's not
<table border="1">
. Also, if you create a form using the ASP.NET controls then the old "type your input and hit Enter" doesn't work becuase ASP.NET likes to use a button with javascript to fire the postback instead of the <input type=submit that is usual. Great - what if the user has javascript disabled? Or has webwashing software the strips out javascript? And, ASP.NET controls (at the moment) really only work with IE5 and above. Anything else is considered 'downlevel'. Mozilla 5 and Netscape 6 were actually more standards compliant than IE5 yet Microsoft considered these 'downlevel' which is at the best lazy, and at the worst offensive - especially when many websites (eg http://windowsxp.devx.com[^]) simply crash some versions of IE6 but work just fine thank you very much using any other browser. Ask Paul about XHTML and ASP.NET... cheers, Chris Maunder -
I find you can cut down on that lag by moving the de-bloatification code to firmware. I reprogrammed an old toaster of mine to do it for me. Keep up with the times, Johnny. :cool: J
"You can get anything you want at Alice's Restaurant."
-
Well I created an XML Editor last summer (which now I don't have the source code to anymore due to an nefarious XP+ZoneAlarm crash during linking), but it parsed the XML document in to a tree when it was opened, when it had been modified and saved then it recreated the XML file, but without the unneeded spaces between tags etc. -Steven "the yellow dart" Hicks
CPA
CodeProjectAddict
Actual Linux Penguins were harmed in the creation of this message.
More tutorials: Ltpb.8m.com: Tutorials |404Browser.com (Download Link)
Ok this is what we are all saying. Stripping out spaces, redundant tags and things like that is fine, that we can do and there are tools for it. Now if my bet is wrong then you are sitting on a gold mine but I bet your XML Editor does not look at an XML doc and say "hey buddy! you don't need those namespaces and you can do away with that entity reference and what about changing that string element to a foobar element" etc. etc. Something a bit intelligent that can divine the purpose of a document and optimise it accordingly. Now big apps such as Dreamweaver, Frontpage, GoLive etc. don't have these optimisers. They have the strippers and what not, but not the semantic-like optimisers. XML is probably actually easier to optimise than HTML because there is no visual representation side to worry about. Now I believe anything is possible. Given enough time and some big brains someone could figure this out, but it is not as simple as stripping white space and redundant tags.
Paul Watson
Bluegrass
Cape Town, South AfricaRobert Edward Caldecott wrote: My father-in-law calls yer man bits "weasels"
-
I do all my HTML "code" by hand. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
But why?..It's like coding in assembly.
I always think that the idea of a compiler that compiles another compiler or itself is rather incestuous in a binary way. - Colin Davies My .Net Blog
-
I have a little utility I wrote to strip out all of the unnecessary spaces and tabs to help compress dynamic html fragments. If you would like to use it, let me know. onwards and upwards...
basementman wrote: If you would like to use it, let me know. Not exactly what I was looking for, but it never hurts to get your hands on something new. :-D What's the URL? Thanx,
Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking. -
basementman wrote: If you would like to use it, let me know. Not exactly what I was looking for, but it never hurts to get your hands on something new. :-D What's the URL? Thanx,
Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.http://test.pubsuite.com/Jeff/StripSpaces.zip onwards and upwards...
-
> I do all my HTML "code" by hand. I'm a Notepad fan myself. If there's any bloat, you only have yourself to blame. ;P
Vim is the way to go :)
-
http://test.pubsuite.com/Jeff/StripSpaces.zip onwards and upwards...
basementman wrote: _http://test.pubsuite.com/Jeff/StripSpaces.zip_ Thanks! :rose:
Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.