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
-
Harms of hidden categories on SEO
On our website we have some invisible/hidden categories on our site. Can anyone advise whether these are harmful in terms of SEO?
On-Page Optimization | | CostumeD0 -
SEO for a Domain which contains Multiple individual sites
My website structure www.example.com (wordpress installation number 1)
On-Page Optimization | | kevinbp
www.example.com/forum/ (vbulletin installtion)
www.example.com/shop/ (wordpress installation number 2) Each of these individual pages contains a fresh wordpress/vbulletin installation with their individual admin control panel. Am i doing this website entirely wrong? Is my website considered as a single website or does Google classify it as 3 different websites? My Ranking page is, www.example.com, and by blog post is www.example.com/forum/blog. When i do a link within my blog entry to my main ranking page, does it count as external or internal link?0 -
Product Descriptions & SEO
I got another small question for my price comparison website that I run 🙂 An example product from my site, to which this question relates http://goo.gl/XDTUNs I have about 600 products which I track, and the product description I have for each is as follows; Paragraph 1 - Standard copy which is contained on all products, only the product name / keyword is changed "Easily compare prices below on a XXX" Paragraph 2 = Blatant, 100% copy of the product description from Amazon Paragraph 3 - Standard copy which is contained on all products, only the product name / keyword is changed "Always read your chosen stores product description before buying your XXX" Firstly, I am now on a mission to create unique descriptions instead of the Amazon ones I foolishly copied. My question is, are the standard paragraph 1 and 3 which are in all my product ok? Or should this be avoided? Should my unique description be paragraph 1, or can it remain in the middle? The reason for the three separate paragraphs was so I could mention to keyword 3 times, which is what is suggested on the Moz page grader. Thanks so much!
On-Page Optimization | | MrPenguin0 -
SEO targeted text on Mobile Site Version
Hey Mozzers, I run SEO for a retail site www.uncommongoods.com. We are building a mobile version of our site on m.uncommongoods.com On each of the category pages of www.uncommongoods.com, we have included a few lines of text at the bottom of the page to get some of our target keywords into the body. As an example, if you look at this page: http://www.uncommongoods.com/office/journals-stationery/journals You'll see this copy at the bottom: "Find unique journals and diaries at UncommonGoods. Our creative journal gifts are great for marking special occasions with sentimental keepsakes." We are debating whether or not to remove this copy on the category pages of our mobile site, just to keep the pages as clean as possible. Would there be any risk in leaving this out ? Thanks for your help on this! -Zack
On-Page Optimization | | znotes0 -
Category pages - SEO or deindex?
What is the best thing to do with category pages? Should I deindex them or use SEO on them? I use the Thesis theme and the Wordpress SEO plugin. I am just not sure what to do with category pages. Also will they create duplicate content?
On-Page Optimization | | dealblogger0 -
Drupal SEO Question
Still trying to get a handle on all this...a lot to figure out! My site is Drupal and a few weeks ago I had my developer install an SEO Module so I could add a meta description and keywords for my pages. I have done that for the majority of the landing pages and the product pages as well. Earlier I posted a question about the use of adding the meta description and keywords to each product. The answers were mixed and pointed out the problem of the duplicate content which I am trying to figure out how to fix. BUT...when I went through my On Page Analysis grading for my campaigns one of the reasons my grades were low were because of the use of meta keywords tag. That the search engines ignore them and competitors can use them against you. So now I am thoroughly confused. I should optimize each product page with the meta description and keywords or i shouldn't? Keywords should show up in the title tag and the content....anywhere else? Help! Thanks much, Shara
On-Page Optimization | | Confections0 -
Should I bother with branded keywords in my onsite SEO improvements?
Someone recently told me that using branded keywords extensively in your copy and titles may be unnecessary so long as you have a substantial catalog of back links containing keyword rich anchor text. Can I take this to mean I can privilege non-branded terms over branded in my onsite SEO efforts?
On-Page Optimization | | bbelgard0 -
Do Schema.org changes impact local SEO
I've reviewed the various presentation and blog posts from SMX advanced regarding local SEO and I didn't see any mention of Schema.org and microformats. Has any research or case studies been presented supporting that implementation of Schema.org microformats will improve local results? Here is one example where I've implemented the basics in the address info of the footer. http://bit.ly/lZQYeg Any tips on how to further optimize with schema.org markup?
On-Page Optimization | | DotCar0