 |
 |
html "cleaner"
|
 |
|
 |
|
Junior Member
Join Date: Sep 2003
Location: Ireland
Status:
Offline
|
|
is there software that will clean up html pages? i used word, dreamweaver and front page at different stages on a web site and would like to strip the pages of all the rubbish they put in!
thanks in advance,
Jan
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
|
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
i'd be interested to know what "rubbish" you think Dreamweaver adds to your code. GoLive, yes; that outputs some messy code. Dreamweaver doesn't particularly add anything that i can think i wouldn't add if i was coding by hand.
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by philzilla:
i'd be interested to know what "rubbish" you think Dreamweaver adds to your code. GoLive, yes; that outputs some messy code. Dreamweaver doesn't particularly add anything that i can think i wouldn't add if i was coding by hand.
Hmmm... lets see now...
Code:
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="gfx/home/background.gif" onLoad="MM_preloadImages('gfx/home/oval_two_over.gif','gfx/home/oval_one_over.gif','gfx/home/oval_three_over.gif','gfx/home/oval_four_over.gif','gfx/home/oval_five_over.gif',
'gfx/home/background.jpg','gfx/home/blob1.jpg',
'gfx/home/blob1_over.jpg','gfx/home/blob2.jpg',
'gfx/home/blob2_over.jpg','gfx/home/blob3.jpg',
'gfx/home/blob3_over.jpg','gfx/home/blob4.jpg',
'gfx/home/blob4_over.jpg','gfx/home/blob5.jpg',
'gfx/home/blob5_over.jpg','gfx/home/blob6.jpg',
'gfx/home/blob6_over.jpg','gfx/home/blob7.jpg',
'gfx/home/blob7_over.jpg','gfx/home/blob8.jpg',
'gfx/home/blob8_over.jpg','gfx/home/blob9.jpg',
'gfx/home/blob9_over.jpg','gfx/home/blob10.jpg',
'gfx/home/blob10_over.jpg','gfx/home/blob11.jpg',
'gfx/home/blob11_over.jpg','gfx/home/blob12.jpg',
'gfx/home/blob12_over.jpg')" bgcolor="#4F56B1">
Not that GoLive's is much better, it's just that all the 'default' WYSIWYG javascript, comments and extra unnecessary attributes seem plain icky.
BTW, this was code that was given to me - I HAD NOTHING TO DO WITH IT, OK!!!
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Simon Mundy:
BTW, this was code that was given to me - I HAD NOTHING TO DO WITH IT, OK!!!
yeah yeah, that's your story and you're sticking to it, right?
okay, i forgot about all that javascript. i usually just throw all that in its own file anyway, and then call it from each page it's needed on. much better.
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2003
Location: Ireland
Status:
Offline
|
|
I used the 'save as web page' tool in Word... I know it's very lazy, but I had to get a site up quickly. Even my basic knowledge of html tells me there's far too much rubbish in the code - but unfortunately I don't know enough to clean it up myself! Also, it would take far too long for all the pages.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status:
Offline
|
|
There's more reason than just that not to use Word. It has non-printing characters which can mess up your page.
|
|
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
ugh. Word's HTML. i think i'd rather have my gonads replaced with red hot coals, than have to deal with that mess.
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Originally posted by philzilla:
ugh. Word's HTML. i think i'd rather have my gonads replaced with red hot coals, than have to deal with that mess.
That should be an option.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2002
Location: Barcelona, Spain
Status:
Offline
|
|
Dreamweaver produces reasonably clean code, but your pages will not validate because DW does not close some tags, "JavaScript" etc.
MS Word?!?! What are you smoking, cuz I want some of that
Oh well, I'll just get back into my box.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2003
Location: Ireland
Status:
Offline
|
|
i know, i know! it's just that i had a load of word documents with tables and i took a shortcut. now i'm stuck with ugly ugly script. it will take forever from scratch and redo them.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2003
Location: Ireland
Status:
Offline
|
|
Thanks - that textism thing is brilliant. The MacTidy was too complicated for my non-using Terminal self 
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status:
Offline
|
|
Originally posted by philzilla:
ugh. Word's HTML. i think i'd rather have my gonads replaced with red hot coals, than have to deal with that mess.
I once cleaned up a large file converted from Word to HTML. It went from 500KB to around 70KB.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by wataru:
I once cleaned up a large file converted from Word to HTML. It went from 500KB to around 70KB.
I once looked at a HTML file from Word. I couldn't sleep for weeks. That thing was scary!
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|