Developer comments in code & SEO
-
A client of mine has provided an SEO report that states:-
"The inclusion of comments by developers in the coe is common practice.....
....its is not positive to leave large blocks of code in the site as makes crawling difficult to crawl"
Im thinking that this has no SEO import at all, any one come across this?
Thanks
z
-
I dont use comments either, i like to see nice easy to read html
-
Developer comments would not survive on one of my sites.
-
Some developers over use comments and can make the file larger and slower, also push content too far down the page.
It can stuff up crawling depending what is in the comments.
I dont believe in minifying code so it can not be easaly read and debuged, but on the other hand you should try to keep code clean as posible, dont use comments if they are not really needed.
-
As a web application developer, I liberally use inline comments (code at the header and inline with code). It's a key to maintaining the code over long periods of time (we forget what we did and why) and across teams (somebody else may need to update code I originally wrote).
That said, I use comments surrounded with tags that do not end up in the HTML code rendered to a visitor. Most languages that "create" HTML code as output (ColdFusion, PHP, etc) usually have tags so comments can be used without being seen in the HTML.
In my opinion, this is the way to go.
Neil, you're probably concerned with the comments in HTML comment tags. I cannot help you there. For those of you who can suggest best practices to site owners and developers, ask that whenever possible inline comments are in tags that **do not show up in final HTML. **
Also, as a practice, I do not want the World seeing (or reverse-engineering) my code based on my comments. Use them as a web developer yet hide comments in output so SEOs do not have headaches of wondering how it affects rankings/page performance.
I hope that helps.
-
Thanks, just a file size issue then. Sorry the image is taken from SEOmoz as an example.
-
The comments you highlighted are actually Internet Explorer conditionals used to give different versions of IE different style sheets. I don't think there's any SEO problem here. (Although I recognise this isn't your site)
Removing them may cause you problems with the layout/style of your site.
-
Comments visible in HTML code do increase the file size, but assuming these blocks of code are of a reasonably normal size, that shouldn't be a problem. Search engines ignore everything that is commented out (mainly because it would make gaming the system so easy).
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Should I Use WooCommerce Tags & Attributes?
I'm helping an online furniture store search engine optimize a WooCommerce store and I'm trying to make sure our taxonomies make sense. I'd love any help you guys can give, but I'm particularly interested in determining whether we should use tags. Product attributes make sense to me, but I'm concerned to use tags because of the propensity for creating duplicate content. Thanks in advance for any help you guys are willing to give.
On-Page Optimization | | cbizzle0 -
Woocommerce ULRs & SEO
My company is in the process of converting from a .net site to a wordpress site using Woocommerce. We are #1 in Google SEO ranking and have spent a lot of time getting to this point. My currents URL is /smithco.com/rotating-widgetsbecause of the way wordpress works - I'm going to have /product/ in the URL in the new siteThew new URL will be/smithco.com/product/rotating-widgetsShould I be worried about this ?thanks in advance
On-Page Optimization | | ThomasErb0 -
Moz_pagespped and seo
I am using mod_pagespeed to increase page speed.However it changed image url. before: /cars.jpg after: /cars.jpg.pagespeed.ci.dfdfdfre.webg with:mod_pagespeed This is issue for seo? How can i change it?
On-Page Optimization | | Netliste0 -
How updating a post can influence seo
I have just read this great post from moz blog: http://moz.com/blog/google-fresh-factor But I haven't found nothing about updating post date. If I edit an old great post (now ranked 2nd after several months in 1st serp position) does it be better if I also update the date of the post in the wordpress post edit page? Thank you very much and sorry for my poor english. Bye, Dario.
On-Page Optimization | | Italianseolover0 -
Getting access to clients websites for onsite seo
I understand on site seo fine, as I have tweeked up my own website a fair bit. But I am thinking about doing Onsite and Offsite SEO for clients, as I have had a few request now. So my question is what is the best way to get access to clients websites. So I can make the required adjustments. I have one client, who had a company create a website for him, but they have since closed down.
On-Page Optimization | | aussieseoguy0 -
Seo'ing Sub domains for images
We are currently adding some performance improvement to our websites, to improve user experience. One of the things we are looking at is splitting of images over several sub-domains, to increase the number of images that can be downloaded at the same. We have seen that using key phrases within image names has an improvement in rankings. So, the question is should we create sub-domains as key-phrase.example.co.uk or as i1.example.co.uk? K
On-Page Optimization | | soltec0 -
Is having the word catalog in an ecommerce site url detrimental to seo.
IS: www.example.com/catalog/category%/product% better than www.example.com/category%/product% category and product are dynamic values that change with the diff. categ. and products displayed while catalog is constant.
On-Page Optimization | | no6thgear0