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
-
How shall be the permalinks fo Seo wordpress?
I just installed wp super cache plugin for wordpess, it´s asking me to edit the permalinks how shall they be to get a nice ranking and seo well done Thanks
On-Page Optimization | | emailfsoftware1 -
Wix.com Website Builder Html5 and SEO, what is your opinion
I'm planing to built a multilanguage website using a website builder. After reading websitetooltester.com reviews I came to the conclusion, wix.com should be the website builder I need. My first reason are the templates and there multilanguage options. But there is one thing, ready the review they mention: ''This is a bit technical; you can find the short version below. Wix is using the “single page pattern” meaning that the complete website code is essentially on one page. This works well for website visitors but not necessarily for Google as contents will be shown dynamically using Javascript and DOM manipulation. To solve this, Google supports something called ‘escaped fragments’ (or ugly URLs). With regards to Wix, it means that URLs will end like this: “#!wixseo|cqh1”. Google replaces the “#!” by “?escaped_fragment=” and receives only a minimal text-only page without Javascript. And this works well for Google. Try it here:
On-Page Optimization | | BigBlaze205
http://www.html5-websitebuilder.com/?escaped_fragment=cqh1 The official page ID is “cqh1” and not “wixseo”. But as the URL contains both IDs, the visitor can even see a description that’s readable by humans (and that’s important for SEO). You may have seen URLs containing “#!” already if you are a Twitter user.'' Should I worry about Google indexing all the pages? Is this website builder SEO frendly? Thank you for your help and time, BigBlaze0 -
What is the most SEO friendly Shopping Cart?
What is the most SEO friendly shopping cart? I have been using zen-cart for 6 years. Seems Google doesn't like it as much as other carts. I started a new site about 6 months ago using Magento. When I build links to this site the terms move. The terms are very similar. So I would imagine the competition is the same. I am curious if anybody has tried with different carts and found anyone to be better than the others. Also the new site has about one tenth the amount of products but has a lot more pages indexed.
On-Page Optimization | | kicksetc0 -
Hotspot area for SEO
Hi, we have an online store: http://www.redwrappings.com.au/ There's been a debate regarding which area is recognised to be the most important place/hotspot for SEO: Free delivery van area (top left panel) OR Top menu navigation Given that if you look at the page html source code, the top navigation loads last and the free delivery fan area is the first one to be read in the html source code. We did this because we want the body page content (h1 & text content) to be read first by search engine robot & also the body can load faster for the user. Is this the right thing to do or we better off load the top navigation first? Thanks
On-Page Optimization | | Essentia0 -
Adding dynamic item to static page - good for SEO?
We have a static page we want to rank for a competitive phrase. Would it help, or would it make little to no difference, if we added a small dynamic item to the page so that each time the googlebot visited the page it wouldn't be 100% the same as the last time it visited? The reason to do this would be because of the belief that Google likes pages that update once in a while. The dynamic portion of the page wouldn't be as simple as a page counter, but it wouldn't be very elaborate either. A tiny portion of the page. Think of something like current temperature or current CPU utilization (it won't be that, but it will be a small updating number that is not incrementing like current time or a page counter). Would that make any difference at all? (I know there will be responses that I should add real updating data to the page to make it dynamic; let's take that one off the table for right now --trying to see if there's something I can do that is simpler for now). Thanks.
On-Page Optimization | | scanlin0 -
SEO Change/Version Control
Hi. Can anyone suggest apps that might be applied for SEO change/version control? I've tried using Excel and Word in the past but both fall short when dealing with multiple client sites. Nothing suitable pops up so far. Specifically I want to be able to log any on-page changes that might impact SEO for historical analysis and possible roll-back (manual) eg change date, page title, headings, url, anchor text, alt image txt, body copy etc. The ability to have one view that can be filtered in various ways including by client and by url would be ideal. Maybe this is something SEOmoz is considering for Pro campaign management? Surely there's demand... Thanks Andy
On-Page Optimization | | Bluesnapper0 -
Re-write homepage url for non EMD for SEO
Hi, A lot of talk about EMD's lately not just here but all over SEO and affiliate forums. I've dabbled in emd's but have decided to go against the grain and use a non emd. I think I can optimise hard enough to rank and at the same time build a brand, which is where most emd's fail. But my question is this: If you are targeting lets say the term 'running trainers' and the domain is runyoursocksoff.com would it be more beneficial to rewrite the root domain to this: runyoursocksoff.com/running-trainers/ It does look messy to me and more then likely I would not use this but I have seen it a few times and was wondering if its a work around for non emd's.
On-Page Optimization | | activitysuper0 -
SEO Domain Values
I always thought that there was no difference in value between a .com and .net, also that hyphens have the same value as the keyphrase without the hyphen. But I have heard Rand lately saying hyphens are spammy - whats the go? Is CarParts.com better than Car-Parts.com or Car-Parts.net etc?
On-Page Optimization | | Ventura0