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
-
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 -
SEO Optimization for Sales Page
Hi, I am new to eCommerce. Traditionally I have run a couple of semi-successful websites relying largely on Adsense revenue and affiliate income. So I have a bit of experience with on page and off page SEO. This time around I am creating a membership site and also sell eBooks as bundles that non members can buy. My question is, should I SEO optimize the sales page for my eBook or use another content page that links to the sales page. For example, if I am selling an ebook on Dog Training and targeting the main KW "Dog Training Tips", should my sales page be optimized for "Dog Training Tips"? The reason I ask is because typically Sales pages do not provide a lot of useful information but are more geared around selling the product. The other option would be to create a helpful information page targeted for "Dog Training Tips" and lead users to my sales page through contextual links, banners, popups (I hate popups), etc. This would be the approach for the other LSI keywords anyways. Any thought would be appreciated.
On-Page Optimization | | dwautism0 -
SEO for a site in development
We've recently taken on a new client for an initial 6 months for SEO (until their new site is going live) to help build traffic to the site. They are currently getting a new website built so don't want work done on their current site... but due to the current structure it is making it difficult for us to improve rankings for a number of keywords. They are essentially a booking engine for services across the UK so it is just a home page with a search filtering through their services, locations and dates which leads to a results page. It is a combination of services and locations we need to target keywords for but there are no appropriate landing pages due to the site layout. The one thing they are happy for us to work on is the blog, so my question is would it be best to create landing pages on the blog targeting keywords such as 'sports massages in London' and build links to these pages? Then when it is time for the new site, with new appropriate landing pages, simply 301 redirect these pages? If anyone has any input on this idea or suggestions for other ways about it we'd be delighted to hear from you Thanks
On-Page Optimization | | Will_Craig0 -
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 -
Bullet points good or bad for seo?
Hi Everyone, After a body of unique content of say 50 words, will Google then penalise you for adding bullet points which will then be duplicated across all those products (say 100 products)? http://www.polesandblinds.com/acacia-teal-roller-blind/? Look forward to your comments, good or bad, Thanks Jonathan
On-Page Optimization | | JonnytheB0 -
Category pages - SEO or deindex?
What is the best thing to do with category pages? Should I deindex them or use SEO on them? I use the Thesis theme and the Wordpress SEO plugin. I am just not sure what to do with category pages. Also will they create duplicate content?
On-Page Optimization | | dealblogger0 -
Optimization for allready indexed web without seo before
Hi, I have some questions. I have 2 Joomla web sites who needs seo optimization, but there are allready indexed in Google: 1/ Will rel=canonical fix the problem for duplicated content for allready indexed pages? I have read different solutions but I haven't tested them all. I puted rel=canonical on the first web site that I started to optimize, but Google WMT shows me very small or not at all decreasing of duplicated content. Would it need more time? 2/How can I show search engines to craw and change the cache for a page that is allready indexed faster than 1-2 months? 3/ What is your opinion and experience? With done changes for one website for a low competition keyword /the web site was not optimized for search engines before/ how much time will it take usually for Google to see the changes made and change the ranking for some keyword?
On-Page Optimization | | vladokan0 -
Do you ever forget the SEO basics?
We all get a little sloppy at times. Just yesterday , someone pointed out that I accidentally blocked the robots from one of our primary pages, because it was being included in a wildcard match on one of the disallow commands in robots.txt. Sometimes the mistakes are very basic. The one below is just too funny. I thought I would share the love. Search Google for "MD care" MD Care Inc. - Welcome<a id="LXPLSS_979677678U1"></a> <cite>www.mdcarehealthplan.com/</cite> This is an SEO description that will be seen by the search engines and used in the search results. The meta keywords tag is even funnier: <meta name="keywords" content="spam,the,keywords,here,like,this,and this,good" />
On-Page Optimization | | irvingw2