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
-
Product Descriptions (SEO)
So I would like a few opinions. How long should a product description be? Enough to get the point across? 100 words? 800 words? Over detailed? Any advice would be appreciated.
On-Page Optimization | | mattl990 -
SEO for a Domain which contains Multiple individual sites
My website structure www.example.com (wordpress installation number 1)
On-Page Optimization | | kevinbp
www.example.com/forum/ (vbulletin installtion)
www.example.com/shop/ (wordpress installation number 2) Each of these individual pages contains a fresh wordpress/vbulletin installation with their individual admin control panel. Am i doing this website entirely wrong? Is my website considered as a single website or does Google classify it as 3 different websites? My Ranking page is, www.example.com, and by blog post is www.example.com/forum/blog. When i do a link within my blog entry to my main ranking page, does it count as external or internal link?0 -
Will ReDesigning my website negatively affect SEO?
I currently have a one page website which lists all the company information on one page [domain name is www. bwd . co . za]. It uses javascript for navigation. My challenge is that the layout is outdated and I would like to update it with a high quality WordPress theme which will not be a one-pager. Currently on Open Site Explorer the website has a domain authority of 30/100 and page authority of 41/100. I've worked hard to push the numbers to get to where they are hence I'm a bit concerned. Will re-designing my website negatively affect SEO?
On-Page Optimization | | bonganig0 -
SEO without CMS: Impossible?
Is WordPress the ONLY way to go for an SEO friendly website? Any REAL reason for using anything but?
On-Page Optimization | | EliteErikSEO0 -
Does Channeladvisor really assist in SEO?
I'm getting emails from Channeladvisor recommending I join, thereby taking advantage of a change to Google Shopping. It is starting in Australia from today (13Feb13). Is it an upgraded version of Google Adwords, or another form of a Commerce Merchant (obviously with multiple channels,e.g. Ebay, Amazon etc)? With Adwords, I found it too expensive for the type of product we sell (printer cartridges). But the real question is, DO MY RANKINGS DROP FROM NOT USING CHANNEL ADVISOR?
On-Page Optimization | | ABCPS0 -
Drupal SEO Question
Still trying to get a handle on all this...a lot to figure out! My site is Drupal and a few weeks ago I had my developer install an SEO Module so I could add a meta description and keywords for my pages. I have done that for the majority of the landing pages and the product pages as well. Earlier I posted a question about the use of adding the meta description and keywords to each product. The answers were mixed and pointed out the problem of the duplicate content which I am trying to figure out how to fix. BUT...when I went through my On Page Analysis grading for my campaigns one of the reasons my grades were low were because of the use of meta keywords tag. That the search engines ignore them and competitors can use them against you. So now I am thoroughly confused. I should optimize each product page with the meta description and keywords or i shouldn't? Keywords should show up in the title tag and the content....anywhere else? Help! Thanks much, Shara
On-Page Optimization | | Confections0 -
Will adding affiliate links negatively affect my SEO?
I'm thinking of signing up to a couple of affiliate programs related to my industry. Will adding affiliate links at the bottom of articles for example negatively affect my seo? I intend to have lots of useful content on my site and not just affililate links.
On-Page Optimization | | SamCUK0 -
Is allowing comments a good idea?
One (in fact a couple) of my sites is built using Wordpress so I could take advantage of things like Related Posts widgets, etc. However, the layout and navigation of the site is set up more like a traditional website rather than a blog and from the beginning I removed the comment box from the template. I am wondering now whether allowing comments would actually be a good idea for SEO, or if I should leave it as it is. The content of the site doesn't really offer opinions (aside from a few product reviews) so to my mind comments dont really fit. Thoughts or opinions readily welcomed...
On-Page Optimization | | Jingo010