Welcome to WebmasterWorld Guest from 54.167.216.239

Forum Moderators: incrediBILL

Message Too Old, No Replies

Should you crunch your code?

advantages and disadvantages

     
12:49 pm on Mar 1, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 28, 2003
posts:869
votes: 0


It has been suggested to me that we ought to crunch all our website code using a 3rd party tool.

I believe this means to remove all white space and comments from the outputted HTML, as well as 'optimisation' of css and js amongst other things.

Would everyone here agree that this is a Good Thing to do, or does it have any downsides?

Call me a cynic, but I don't know if I'm entirely comfortable with having my code 'optimised' by a third party! Should I simply be 'optimising' it myself?

1:55 pm on Mar 1, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member quadrille is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 22, 2002
posts:3455
votes: 0


I doubt simply 'crunching' will make much difference to SEs - and it will make editing much more difficult!

I totally agree with clean, unbloated code ... but that's a rather different issue!

2:04 pm on Mar 1, 2007 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9074
votes: 6


The effect that such tools can have is minimal compared to on-the-fly compression tools such as mod_gzip or mod_deflate. Using gzip compression on the server can reduce page weight by up to 80%, gzip is available widely in most Apache installations, even on shared hosts.

I agree with Quadrille too that removing the white space makes editing much harder, and without gzip compression the difference in page weight would be small.

2:26 pm on Mar 1, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 9, 2003
posts:503
votes: 0


Personally I don't see the point in crunching. A good CSS design will not contain an huge amount of code.

If it does and you're worried you could code the html so the majority of your reader text is at the top and stick large portions of the coding below.

8:41 pm on Mar 1, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 11, 2005
posts:76
votes: 0


Personally, I do run my html through a code optimizer, but I think the benefit is greatly reduced in this age of broadband. As for editing the code, I'm doing that before compression - compression is the last step before upload. And if I do need to do a quick and dirty edit with the ftp client, I know the code well enough that it is not a problem to make minor changes in the compressed code as it sits on the server.
2:28 pm on Mar 8, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 28, 2003
posts:869
votes: 0


Thanks for the info guys. I think I'll leave this one on the back burner.
11:04 am on Mar 9, 2007 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 5, 2006
posts:3440
votes: 52


I used to worry about this in the days of 28k modems but stopped bothering back when I got a 56k.
11:10 am on Mar 9, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


I often crunch before publish but always keep the uncrunched code to edit next time. I do not keep a local copy of the crunched code.

In fact I usually keep all uncrunched old back-copies of websites that I work on. You never know when you'll need an old page again.

6:29 pm on Mar 11, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


Has anyone had their CSS/pages "messed up" after they've been run through through a 'cruncher'? Is there a reliable CSS/HTML/JS cruncher that can be recommended? More of a curiosity.

The effect that such tools can have is minimal compared to on-the-fly compression tools such as mod_gzip or mod_deflate. Using gzip compression on the server can reduce page weight by up to 80%, gzip is available widely in most Apache installations, even on shared hosts.

Hhhhmmm, interesting! This prompted further research...
[http-compression.com...]

This very site [webmasterworld.com] appears to implement this, and after a bit of 'web sniffing' reveals that the encoded page (sent to the browser) is a little over 10KB, and once decoded is 56KB! That's quite a saving in download time and bandwidth!

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members