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
-
Is page speed important to improve SEO ranking?
I saw on a SEO Agency's site (https://burstdgtl.com/search-engine-optimization/) that page speed apparently affects Google ranking. Is this true? And if it is, how do I improve it, do I need an agency?
On-Page Optimization | | jasparcj0 -
SEO Content Development - Where do unicorns live?
A great web page (for organic search) needs more than great copy. Tons of articles tell us how important it is construct a web page. Others beat the drum of content, content, content. Who are these unicorns who understand on-page SEO and are great writers to boot? I'm imagining a "content developer", or I might call it a "technical SEO writer. Neither really captures the need. I don't need a copywriter to deliver some text, nor an SEO who can't write their way out of the paper sack. I need an "SEO content specialist" who can craft an on-page experience; someone who thinks about things like SERP features and understands the concepts of semantic content. The problem is that I have no idea how to find this person. "Content Marketing" is the buzz right now, but that's not it either. I'm not talking about a blogs and social media. I'm talking about building great, core web pages. Does anyone else have this challenge? How have you been successful? Where do unicorns live?
On-Page Optimization | | Jason-Rogers4 -
Google Site Search & SEO benefits
Hi all - I've had a comb through the forums here but can't seem to find any updates on whether there any tangible benefits for using Google Site Search. We're currently exploring using Lucene, Oracle Endeca, & Google Site Search - but from what I've read so far there are no quantifiable benefits for choose Google over any others. Everything I've read is rumor-mill...anybody have experience or references? Thanks in advance!
On-Page Optimization | | kenno690 -
Left Nav / SEO
We are in the middle of a redesign and would love to get rid of our left navigation. It's currently full of SEO rich categories and has been the same for 10+ years. Our programmers think removing the left navigation will have no impact on our SEO. As SEO's, do you agree with this?
On-Page Optimization | | EileenCleary0 -
SEO for EMD
Hi, I bought ForSaleInAZ.com for my real estate website. Google Keyword Tool estimate 301k local searches for that term. I would like to capitalize on this by building this site with good content. My question to you, besides the search being the URL, what is the best practice to specifically promote the "For Sale In AZ" phrase? Should it be in the Page Title, Meta Description, Content H1 & H2 tags, Image tag? Or, is it being in the URL good enough...so all I have to do is build good content? I understand not to over do it but I could use your advice. Can you please give me some suggestions/ guidelines to follow specifically to my EMD? SEO Expertise Level: I am comfortable and have the decent understanding but, by no means, an expert! Thanks, Carl
On-Page Optimization | | AmSupMktg0 -
Are outlinks an essential element for onsite SEO?
I recently read the blog post by Steve Webb about performing a SEO Audit (http://www.seomoz.org/blog/how-to-perform-the-worlds-greatest-seo-audit). In the article he mentions that it's important to have outlinks to high-quality websites. So my questions is if this is an essential element of onsite SEO?
On-Page Optimization | | Nick_Johansson0 -
Is On Page SEO Dead?
Hey Guys, Search Engine Roundtable has published a short post about this a few days ago, quoting senior member at WebmasterWorld forums who said: "The way I see it, on-page text today is for the "relevance" part of the total algorithm. The whole algorithm is, in broad strokes, "relevance + connectedness + quality". After you've clearly stated the relevance of the page, then the rest of your ranking power comes from elsewhere. I've added on-page bold tags with no effect. I've added or changed h1 elements with no effect. Not too long ago, those might well have done something, but that's not the game anymore. And moving from a table layout to a CSS-P layout today might get you nowhere, too. It all depends how deeply complicated the table layout was, I think." http://www.webmasterworld.com/google/4408395.htm Is it true? Is on-page SEO really dead? What do you think?
On-Page Optimization | | ShivaS0 -
URL STRUCTURE & RE-WRITING
1.) I need a suggestion from you, please help. How should be the Directory/URL structure if I am offering servicves in many cities of UK/US. /<service>/
On-Page Optimization | | younus
/<service>/<state>/
/<service>/<state>/<city>/ OR /<service>/
/<state>/<service>/
/<state>/<city>/<service>/ Thanks for your time.</service></city></state></service></state></service></city></state></service></state></service></service> What exactly mean by 'URL enforce writer' to rewrite the URL.0