Should I Minify HTML for SEO?

11 replies
  • SEO
  • |
I understand minifying HTML improves the page load speed which is important for SEO but it seems like quite a big alteration to the code of the site and I am worried that minfying could have adverse affects?

PLEASE NOTE, I HAVE ALREADY MINIFIED CSS AND JS
#html #minify #seo
  • Profile picture of the author yukon
    Banned
    Originally Posted by mikeandtomphoto View Post

    I understand minifying HTML improves the page load speed which is important for SEO but it seems like quite a big alteration to the code of the site and I am worried that minfying could have adverse affects?

    PLEASE NOTE, I HAVE ALREADY MINIFIED CSS AND JS

    It doesn't matter for an average webpage.

    You don't want huge amounts of unnecessary white space (blank lines, etc...) in the HTML source code. Still, it's usually not a deal breaker for ranking pages.

    The idea of compressing HTML code is to make a smaller/lighter file size so the page loads faster for traffic & Googlebot doesn't timeout before scraping the entire webpage. Something like 7 milliseconds (or whatever amount) isn't going to stop a page from ranking in the SERPs.
    {{ DiscussionBoard.errors[10501643].message }}
  • Profile picture of the author ktz16
    I agree. I don't think compressing html really gains you anything.
    {{ DiscussionBoard.errors[10501690].message }}
  • Profile picture of the author sanchaydhruba
    You can't get a lot benefit by minifying HTML code. It doesn't effect on ranking. But yes, you should use less messy HTML code in your website.
    Signature
    {{ DiscussionBoard.errors[10502366].message }}
    • Profile picture of the author TechNik
      I don't think it will make a big difference, especially for small/average-size websites. You should also consider readability. Don't want things to be too messy if another developer has to work on your project someday.
      Signature
      Easiest Web Hosting
      • WordPress hosting from $0.84/month. Perfect for small projects and aspiring bloggers.
      www.EasiestWebHosting.com/blogstarter.html
      {{ DiscussionBoard.errors[10502370].message }}
  • Profile picture of the author takticz101
    It may make your website a little bit faster if you have a lot of messy code in there. But not really necessery if you dont have much code.
    {{ DiscussionBoard.errors[10502379].message }}
  • Profile picture of the author AgileBiz
    Hi Mike and Tom

    I see that you're a photographer. Are you talking about your page at Cheshire Wedding Photographers | Mike & Tom ?

    There's no reason not to remove whitespace from your html but for a photographer's website with lots of images it will probably make little difference. There are better ways of speeding up your website like:
    - Compressing image files. I use Compress JPEG Images Online
    - Use a content delivery network (CDN). I use http://www.cloudflare.com

    Hope that helps.

    Love the photos in the portfolio by the way.

    Stephen
    {{ DiscussionBoard.errors[10502381].message }}
    • Profile picture of the author mikeandtomphoto
      Originally Posted by AgileBiz View Post

      Hi Mike and Tom

      I see that you're a photographer. Are you talking about your page at Cheshire Wedding Photographers | Mike & Tom ?

      There's no reason not to remove whitespace from your html but for a photographer's website with lots of images it will probably make little difference. There are better ways of speeding up your website like:
      - Compressing image files. I use Compress JPEG Images Online
      - Use a content delivery network (CDN). I use http://www.cloudflare.com

      Hope that helps.

      Love the photos in the portfolio by the way.

      Stephen
      thanks for the response, an overwhelming no really. Much appreciated.

      Stephen, no not this site. This site is long due an update, redesign and clean up. Summer 2016 here we come.

      The site we have been working on is London Wedding Photographer | Blavou - Home - messy code? Worth the HTML Compression you think?
      {{ DiscussionBoard.errors[10503102].message }}
      • Profile picture of the author yukon
        Banned
        Originally Posted by mikeandtomphoto View Post

        thanks for the response, an overwhelming no really. Much appreciated.

        Stephen, no not this site. This site is long due an update, redesign and clean up. Summer 2016 here we come.

        The site we have been working on is London Wedding Photographer | Blavou - Home - messy code? Worth the HTML Compression you think?


        That URL/page already has minified HTML source code.

        Code:
        Minified using disk
        Page Caching using disk: enhanced
        It's less than 200 lines of code which is nothing for a webpage file size. The page even loads fast.

        Why are you worried about page compression?
        {{ DiscussionBoard.errors[10503122].message }}
        • Profile picture of the author mikeandtomphoto
          Originally Posted by yukon View Post

          That URL/page already has minified HTML source code.

          Code:
          Minified using disk
          Page Caching using disk: enhanced
          It's less than 200 lines of code which is nothing for a webpage file size. The page even loads fast.

          Why are you worried about page compression?
          What about further minification with line break removal?
          {{ DiscussionBoard.errors[10503146].message }}
  • Profile picture of the author mikeandtomphoto
    Trying to make the site as quick as possible with the resources I have.
    {{ DiscussionBoard.errors[10503147].message }}
  • Profile picture of the author Nathan K
    You could use a build tool such as gulp or grunt to minify your html, css and javascript.
    Then you can have your original files as it is and build files minified.
    {{ DiscussionBoard.errors[10503153].message }}

Trending Topics