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
-
What is the safest way to redirect for best SEO benefits?
What is the safest way to redirect for best SEO benefits? Example: loodgieter-aanhuis.nl -> loodgieters-ambacht.nl Does someone have any technical information on how to (root) redirect for best SEO practices?
On-Page Optimization | | hans-keeren0 -
Ranking & Visibility suddenly Down for my website
Any google updates or, can anyone tell me what google running, web ranking down, majority keywords showing on 1st pages right now those are on 3rd page, so is there any specific reason, or any solutions plz.. this s my website www.iqlance.com can anyone help me to audit and what was the issues facing exactly..
On-Page Optimization | | harry5501 -
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 -
WP SEO plugin
When working with WP sites I generally use Michael Torbert's All in One SEO Pack. I've encountered a few examples where when the homepage shows up on a Google search results page the title/title tag shows up as {Business Name:} | {Keyword/Description}. In the 'General Settings' of the plugin in the 'Home Title' field, I have it listed as {Keyword/Description} | {Business Name} I'm not sure why the order is getting switched and where the ':' comes from. I'm not sure if this even has any adverse effect. If anyone has had experience with this, your input would be appreciated. Note - I'm not seeing this issue reflected on Bing.
On-Page Optimization | | stevefidelity0 -
Schema for Web/SEO Service Pages
I was thinking about setting up my services pages for SEO and Web design with Schema code for a product. Is this a good idea? Has anyone done it?
On-Page Optimization | | NeilBelliveau0 -
SEO Optimizing in UMBRACO
Hi there, I am planning to use UMBRACO to manage my existing website, so my question to Seomozzers out there is what should I be aware of, how safe is it to have UMBRACO in terms of SEO. By using this software, would it be possible to get a positive or negative impact on my keyword rankings? Thanks!
On-Page Optimization | | matti_wilson0 -
Lower case and SEO
Hi I have a client who wants his whole site to be in lower case with the exception of his company name. Absolutely everything. I just want to check whether or not this will effect the way Google sees the site? Does anyone have any idea? ........ and do you have any experience or data to support your views? Thank you PH
On-Page Optimization | | PH2920 -
Duplicate Content for Spanish & English Product
Hi There, Our company provides training courses and I am looking to provide the Spanish version of a course that we already provide in English. As it is an e-commerce site, our landing page for the English version gives the full description of the course and all related details. Once the course is purchased, a flash based course launches within a player window and the student begins the course. For the Spanish version of the course, my target customers are English speaking supervisors purchasing the course for their Spanish speaking workers. So the landing page will still be in English (just like the English version of the course) with the same basic description, with the only content differences on that page being the inclusion of the fact that this course is in Spanish and a few details around that. The majority of the content on these two separate landing pages will be exactly the same, as the description for the overall course is the same, just that it's presented in a different language, so it needs to be 2 separate products. My fear is that Google will read this as duplicate content and I will be penalized for it. Is this a possibility or will Google know why I set it up this way and not penalize me? If that is a possibility, how should I go about doing this correctly? Thanks!
On-Page Optimization | | NiallTom0