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
-
In seo is it nesseccary ro optimize images as well?
Is it right Image optimization creates many advantages such as better user experience, faster page load times, and additional ranking opportunities. And, it's becoming an increasingly more important role in the website? Because I start a blog https://coinmasterfreespinslinks.com/ and need your suggestions seniors. Thanks!
On-Page Optimization | | adsdsadsacd0 -
Disqus Comment is help Ntaifitness seo?
We use Disqus on our blog https://www.fitness-china.com/diy-dip-station Is it helpful for SEO? I found a few comments. Is our blog content not good enough, or use this? Few plugins
On-Page Optimization | | ahislop5740 -
SEO - Keyword Salarpuria Sattva East Crest
Hi, I have been doing off page optimization and targetting two key words. Salarpuria Sattva East Crest and Salarpuria East Crest. I have been ranking well on second one. But the 1 keyword in not appearing first page. Can anyone show some light. My website is http://www.salarpuriaeastcrest.home-adda.com/
On-Page Optimization | | mithungowda0 -
Yoast SEO plugin
I love Yoast's WP plugin, but is there one of comparable quality that analyzes for more than one KW at a time?
On-Page Optimization | | SSFCU0 -
Best wordpress theme seo 2014
In your opinion what are the best wordpress theme in 2014 that are responsive, good speed and seo buildup
On-Page Optimization | | maestrosonrisas0 -
Page Title in Local SEO Title Tags?
Hi All, Still working on my title tag usage for local SEO, and I was hoping for some more feedback. My question is this: In Local SEO titles, I'm using location + keyword combinations, unique on each page. However, since each page has a specific title for the client, I figure I should be placing that at the front. My thought here was that this helps with the overall usability to the reader of the website. Ex. Contact Us page for Pizza shop Contact Us | Springfield IN Gourmet Pizza | Moe's Italian Pizza Anyone have thoughts on this one? Thank you!
On-Page Optimization | | kbaltzell0 -
Seo Moz says there are 124 links on this page - do you see it?
I'm look at the report under Crawl Diagnostics Summary/Too Many On-Page Links It says there are 124 links on this page. I don't see it?! do you? http://www.kisswedding.com/blog/category/garden-wedding-ideas/
On-Page Optimization | | annasusmiles0 -
Are pages with lots of pictures with outbound links bad for seo?
"Inspiration" blog posts are a good example. The one below has 80 pictures as part of a logo inspiration page. But each picture has an outbound url. Bad or doesn't matter? http://www.hongkiat.com/blog/80-creative-and-well-designed-logos/
On-Page Optimization | | seo_f20120