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
-
Image scale Error On page seo
I Have an Image Scale Error in Gtmetrix how to solve it which is the best way to solve it I tried many ways but it's not working.
On-Page Optimization | | AlexSmithh0 -
H1 & H2 headers - When is too close
Hi, I have two similar headers on my site's homepage: H2: Inventory management made easy H1: Kitchen inventory management made easy Target keyword for the page: (kitchen inventory management) My question is are they too similar and would this be effecting my rankings? Should I change the H2 header to something totally different? Thank you Moz Peoples
On-Page Optimization | | vertigoventures0 -
How to hide element without affecting SEO listing
I have a problem I would like to remove header from normal page flow as I already have same information copied in CTA box but I need this header for SEO, is there a way to remove this header from a document flow without being blacklisted by google?
On-Page Optimization | | tesdublin0 -
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 -
Does the link title attribute benefit seo?
Hello, Anyone could tell me the benefit SEO of link title attribute. Is **Link Title **ranking factor? Thanks
On-Page Optimization | | JohnHuynh0 -
Breadcrumb position SEO impact
Hi all, Our UX designers are working on a new page design, and the breadcrumb position looks somewhat strange - it's almost in the middle of the page. The new page looks like this (the breadcrumb is below the head banner), but it's a showcase page that contains about 150 items. Each of them has a small thumbnail, title, category and short description. They've decided to use the head banner's place and have there all items, grouped in categories that visitors can browse. The breadcrumb menu is at 900 pixels from the top of the page In other words, you have the major part of this page content in front of the breadcrumb menu. Are there any SEO implications in such case? Should we use breadcrumbs on this page if they're not at the top? Thanks,
On-Page Optimization | | lgrozeva
Maggie0 -
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 -
Landing Pages for Generating Leads - Must They Be Optimized for SEO?
Question about landing pages: There are landing pages created just for classified advertising. They are stand alone pages. And, are not linked to website (although one can
On-Page Optimization | | BlueBird33
get there via the url) The purpose of these pages is to generate leads. They are keyword rich in title, head and content Content varies, only by 30% Should those pages be optimized like websites? They have a nofollow tag, is that enough? Thank you for taking the time to answer. Peggy0