Forum Moderators: phranque

Message Too Old, No Replies

Formatting my Source Code

Bloats the html size....

         

crobb305

6:52 pm on Feb 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My source code is really ugly. All the html and text run together so there is not much whitespace (when viewing the source). I thought I would reformat it so that all the tags are blocked and easy to find. This added 40k to the size of the page! So it's a toss up between ugly and easy to read.

Any drawbacks to leaving it ugly? Do search engines care? Does this increase in filesize because of the formatting really matter?

ronburk

7:04 pm on Feb 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since you're already handcoding HTML, consider investing some time in learning how to use XSLT. That lets you write your text in lovely, small, formatted XML, and the XSLT processor will then spit out highly compressed, guaranteed-no-syntax-errors HTML for you.

Of course, you also get the benefit of being able to use a few XSLT stylesheets to control all the aspects of your HTML presentation, so that you can change the look of your entire website by just changing one stylesheet and then regenerating all the pages.