homepage Welcome to WebmasterWorld Guest from 54.197.215.146
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / WebmasterWorld / The Macintosh Webmaster
Forum Library, Charter, Moderators: travelin cat

The Macintosh Webmaster Forum

    
Debloater for Mac HTML
Does one exist?
DerekH




msg:977764
 12:41 pm on Mar 31, 2005 (gmt 0)

Anyone know of a program that will trawl a website on local disc and remove all the comments from the HTML?

I know that sounds like a daft thing to do, but I have a website based on Dreamweaver templates and libraries, for which the amount of "bloat" with dozens of "<--InstanceBeginEditable"s is adding about 15% to my website size and monthly bandwidth cost.

DerekH

 

Deodato




msg:977765
 1:11 pm on Mar 31, 2005 (gmt 0)

BBEdit has a remove comments tool. It's such a useful piece of software, I'd recommend it to any mac webmaster.

IIRC, BBEdit tools only work on the active window. If you want to de-comment your whole site at once, you could put together a find/replace that uses regular expressions and runs against a directory.

A bit more set up, but much quicker for more than a handful of pages.

timster




msg:977766
 1:56 pm on Mar 31, 2005 (gmt 0)

And the regular expression Deodato mentions might look like this:

<!--.¦\r*?-->

Do Apple-F, click "Use grep" to do the regular expression thing, and extend selection to match multiline comments.

Definitely back up your site first, though.

Also, if you don't want to spend money today, TextWrangler will do the same thing in the same way. It's a free product from the same company that makes BBEdit.

whoisgregg




msg:977767
 3:48 pm on Mar 31, 2005 (gmt 0)

Regarding the regular expression above, that might strip out commented CSS styling and javascript blocks, so you'd want to have a more specific regex.

I have a website based on Dreamweaver templates and libraries

It adds a step, but if you have Dreamweaver and are using templates and libraries there is an option to publish a site with all the comments and other dreamweaver junk ripped out. Look for it here:

Modify Menu > Templates > Export without Markup...

Just make sure to export to a new folder and to backup before doing it. :)

benihana




msg:977768
 3:50 pm on Mar 31, 2005 (gmt 0)

DW can also do the regex in a site wide find and replace ..

DerekH




msg:977769
 11:11 pm on Mar 31, 2005 (gmt 0)

Modify Menu > Templates > Export without Markup...

Now I feel REALLY stupid!
Thank you.
I really must read the online help more carefully (I lost the plot after the first 2000 pages!)

Thanks
DerekH

BjarneDM




msg:977770
 2:29 pm on Apr 3, 2005 (gmt 0)

[tonbrand.nl...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / The Macintosh Webmaster
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved