WordPress.org

Ready to get started?Download WordPress

Forums

Source Code looks like crap when i view it (2 posts)

  1. rockinrealtor
    Member
    Posted 1 year ago #

    my websites code looks like crap in the view source

    http://www.RockinTheHouse.com

    check out the code of some competitors websites,,

    http://www.homegain.com

    http://www.mslasvegasrealestate.com

    they have clean code that is numbered on the left from top to bottom. I have seen other wp sites the same clean format..

    they also have a nice inviting code of <meta name="robots" content="index, follow" />

    my robots text is set up good,, but the other websites above
    show the "index follow" in there source view,, my site does not
    show that.

    why is my code a mess? is it the template i purchased or the way a plugin like w3cache puts it out?

    THANK YOU FOR READING AND ASWERING.

  2. michael.mariart
    Member
    Posted 1 year ago #

    Your source code says it all. When I "view source" there's one single line of sourc edoe, followed by this HTML comment:

    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
    
    Minified using disk: basic
    Page Caching using disk: enhanced
    Database Caching 8/13 queries in 0.002 seconds using disk: basic
    Object Caching 943/953 objects using disk: basic
    
    Served from: www.rockinthehouse.com @ 2012-10-14 22:44:56 -->

    W3 Total Cache is minimising your HTML code so that you use less bandwidth and serve the code faster (actual variations with this will vary, but most times it's really not that noticable to humans with a standard page).

    After answering that part I have one big question - Why does the formatting of your source code matter? The only people that look at that are the code geeks (like a few of us), and if we want to see it, we'll be able to know what it does without the formatting anyway. As long as your site validates using the W3C validator, what the HTML code behind it looks like really doesn't matter at all.

    The 'robots' META tag is also another thing that's really not needed. The robots will index your content unless you ask them not to, so adding in an extra tag just to tell them to do what they were going to do in the first place is just bloating your sites source code anyway.

Topic Closed

This topic has been closed to new replies.

About this Topic