Forum Moderators: open

Message Too Old, No Replies

HTML Shrinker

reduce code

         

Andrew Thomas

10:22 am on Aug 23, 2002 (gmt 0)

10+ Year Member



Has anyone heard of web shrinker?
Im looking around for a products that remove redundant html/ASP code, etc to speed up bandwidth

any recommendation - i use dreamweaver MX

Andy

4eyes

10:51 am on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe not quite what you are after but...

There is a free Dreamweaver Extension called 'Layer2Style" - I think its available from Macromedia Exchange, but if not, Google should find it.

What this does is strip all the in-line positioning and style info and place it all in the head area.

Once you finished your page, run the extension and then take all the style info in the head and dump into an external css file.

Dump all your javascript into an external file too, and you should have an HTML page that reads almost as cleanly in Notepad as it does in the browser:)

The code still needs to be downloaded of course, but now it is only downloaded once (not once for each page)

Andrew Thomas

12:10 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



Thanx 4eyes, thats exactly what i was after!

moonbiter

3:24 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



If you are really interested in super-duper shrinking your html/asp/js source, HTML Shrinker Pro [thepluginsite.com] is a good choice.

At my place of employment we use it to shrink our deployed intranet/extranet apps, usually shrinking file sizes 25% or so (mostly gained by removing comments and code formatting).

This can add up to considerable savings on larger web applications.

Be sure to keep source copies of the files! They are very difficult to read once compressed.

pageoneresults

3:53 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



> They are very difficult to read once compressed.

Tried one of those apps a while back, just couldn't deal with not be able to read the code like I always have.

A quick way around this is to set up your WYSIWYG (if that is what you are using) to not indent, break or wrap your tags. Most of the file savings comes from stripping out tabs, indents and spaces that are not needed. If you work with a left justified html format without all the tabs and indents, you'll save a considerable amount of file size.

txbakers

4:36 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just don't be the one who has to maintain the code.

I like and need tabular layout of code. All left justified is very difficult to comprehend. The few bytes of spaces and tabs will not make an impact on loading time.

Drastic

4:42 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use an older version of html shrinker, and swear by it. It can reduce your code by a couple of k, plus a little harder for people to rip your stuff.

When you need to work on the code again, just fire up dreamweaver and "apply source formatting." When done, shrink and upload. Works like a charm.

moonbiter

6:34 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



For the applications we are developing we keep uncompressed source files and compressed deployment files.

Some of the apps can get a bit large, and every little savings helps. As an example, in one app we save approximately 150k on all of the files involved per use of the application (it is a wizard-style application with several pages and lots of client-side javascript includes).

Anything we can do to make the downloads a little snappier, especially for those poor sales types in the field with dial-up accounts, helps.

rewboss

5:44 pm on Aug 24, 2002 (gmt 0)

10+ Year Member



I have an old freeware version of HTML Shrinker which I have never used (and it does have some misfeatures and bugs). I suppose it's the same HTML Shrinker that's being talked about here? Anyway, the one I have actually renames the unshrunk originals as back-ups; as long as you don't move the back-ups you can "unshrink" your file if you need to edit it.

If your choice of HTML shrinking thingy doesn't do that, then the answer is to copy all your HTML files in a convenient place so when you shrink the originals you still have the unshrunk copies. To make changes, just edit the unshrunk version, then make a copy of that to overwrite the existing (shrunk) version, and shrink it.

That way you don't have to rely on some HTML editor's attempt to reconstruct your code, and -- more importantly -- you can keep your comments intact.

Nick_W

5:53 pm on Aug 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay, I'm going to be the unpopular one ;)

The best way to shrink/optimize your code is to learn how to write it!

HTML is very easy, and CSS is also not half as scary as you might think.

The best way to eliminate code bloat is to undersand it....

Nick

tbear

6:00 pm on Aug 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Right there with you Nick_W
Learning html and Css will probably take less time than learning to use Dreamweaver competently :)