Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty Lines in HTML source bad for seo? [closed]

I prefer to write my HTML clear, so I may use empty lines here and there - example:

<div>

    <!-- Seasons -->
    <table class="giantTable">
        ...
    </table>

    <!-- Prices -->
    <table class="giantTable">
        ...
    </table>

</div>

Today my new workmate told me that this is bad for SEO, because Google would need more time for parsing the site and may abort with a timeout.

I never heard about this, shall I really write Spaghetti-Code again?

like image 743
iceteea Avatar asked Dec 03 '25 06:12

iceteea


1 Answers

Google do use page-load and rendering time as one metric (of over 200!) for determining your page-rank, so to an extent your colleague is right (although timeout's are not the issue - he is wrong on that).

However, you can have the best of both worlds :) Write your HTML as you normally do, and then minify it before deployment.

Note that there are a number of tools for analysing your site performance (both online, and as browser plugins - e.g. YSlow), and it's a very sensible thing to do. You can have numerous bottlenecks in your web-site, and can often get some quick wins that significantly improve the responsiveness of your site.

As always with optimisation though - measure first! Don't just randomly implement supposed improvements until you have measured the bottlenecks, and then confirmed the improvement is an improvement.

like image 71
RB. Avatar answered Dec 04 '25 19:12

RB.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!