Welcome to WebmasterWorld Guest from 54.198.201.250

Forum Moderators: Robert Charlton & andy langton & goodroi

Message Too Old, No Replies

Does google prefer tidy code?

     
7:13 pm on May 9, 2012 (gmt 0)

Full Member

5+ Year Member

joined:Feb 25, 2011
posts: 257
votes: 0


Evening all.

I was reading a thread on here the other day ( searched and cant find the post) where someone mentioned google guidelines for HTML and CSS.

I use a well known CMS for a site, so off I popped, righ clicked the site and viewed source. Awful ugly code, over 2000 lines and about 800 of those where whitespace, like empty lines and trailing whitespace.

I was hit vy panda in october, question is , could google class messy code as a sign of low quality site? Ive applied a plugun which tidies up the code by removing the above and also tidys up the indentation so Im interested to see if it gets a result.
8:29 pm on May 9, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 7, 2003
posts: 750
votes: 0


Google has no reason to prefer nicely formatted code on the the websites it crawls. Users never see that code.

Google does like nicely formatted code when the engineers there write it. It makes it easier for future engineers (and cheaper for Google).

Lots of whitespace in your code can inflate the file sizes of your documents, eating up bandwidth and slowing down your site. You can either remove the whitespace from your scripts (maybe as part of the deployment process), filter the whitespace out as the pages are generated, or setup gzip compression on your server so that the impact of the whitespace is minimal (gzip does a great job compressing white space).

On my sites I currently use gzip compression and strip out white space from templates during deployment. I also run javascript through the yui-compressor to reduce its footprint. When you do stuff like that, your code isn't in any way nicely formatted when your webserver spits it out even if it is nicely formatted when you are modifying it, but it makes your website faster.
8:53 pm on May 9, 2012 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Apr 29, 2005
posts:1977
votes: 73


I agree with the last poster, Google couldn't give one jot if your code is tidy or not.

More importantly, they can't determine if you code is spaghetti junction code or the latest compliant code.

There is a big BUT though. Life on the web is changing so quickly that good quality standard code using CSS has almost become essential in medium to large websites. Spaghetti coded websites take eons to change sitewide and you need to be able to do that quickly and efficiently nowadays.

I'm in the process of changing one of my smaller sites to clean and tidy CSS at the moment because I intend to expand it considerably over the next six months.
11:11 pm on May 9, 2012 (gmt 0)

Senior Member from US 

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

joined:Apr 9, 2011
posts:13744
votes: 462


I was reading a thread on here the other day ( searched and cant find the post) where someone mentioned google guidelines for HTML and CSS.

Here:

[webmasterworld.com...]
12:33 am on May 10, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member sgt_kickaxe is a WebmasterWorld Top Contributor of All Time 5+ Year Member

joined:Apr 14, 2010
posts:3169
votes: 0


Those google guidelines have issues not many agree with Lucy24, such as not using closing paragraph tags, etc.

Personally I don't think Google cares how clean your code is, they are more interested in identifying your CMS and going straight for the meaty part of the content. They also come back to the same page many times during the first few hours immediately after it is first found to see if it changes and to take note of any social signals you provide such as tweets, comments etc.

Google will, one day, no longer use or trust ANY signals your site sends besides the actual relevant text. The rest is being used less and less already.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members