|Does google prefer tidy code?|
| 7:13 pm on May 9, 2012 (gmt 0)|
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)|
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).
| 8:53 pm on May 9, 2012 (gmt 0)|
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)|
|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. |
| 12:33 am on May 10, 2012 (gmt 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.