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
-
Q& A section - SEO perspective
We have a software in our website where customers can ask questions and it will send questions to people who already bought it to get answers. The answers are there in each item page. So each item page has item description , reviews, and Q&A sections. We get lot of questions and answers and software is great but we don't know if it really is helping us for the huge price we are paying them. In an SEO perspective will it help due to content or will it dilute main keywords due to the Q&A content? Thanks RB
On-Page Optimization | | rbai2 -
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 -
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 -
Is .PW domain is good for SEO?
I want to register .PW domain which has recently got live to register. I am in doubt should it is good for SEO or not.
On-Page Optimization | | semmediapvtltd0 -
Multi-Site SEO using Host Headers
Hi - I'm working on a proposal for a client who runs 3 different career websites. He uses "host headers" to direct the website visitor to the correct website. For example, if the visitor comes from Washington he goes to one url. If he is in Kansas, he goes to another URL. Does anyone have any experience doing SEO with this type of system? What do I need to know? What are hurdles I'll encounter? Thanks, -Hunter
On-Page Optimization | | HunterW0 -
What are the best FREE Magento Extension for SEO?
I am launching an eCommerce website in magento, and there are some affiliate products are included. I am looking best and Free magento extension that allow me to add no-follow attribute to outgoing link with one click. Please do suggest Thanks
On-Page Optimization | | Ganesh340 -
Breadcrumb position SEO impact
Hi all, Our UX designers are working on a new page design, and the breadcrumb position looks somewhat strange - it's almost in the middle of the page. The new page looks like this (the breadcrumb is below the head banner), but it's a showcase page that contains about 150 items. Each of them has a small thumbnail, title, category and short description. They've decided to use the head banner's place and have there all items, grouped in categories that visitors can browse. The breadcrumb menu is at 900 pixels from the top of the page In other words, you have the major part of this page content in front of the breadcrumb menu. Are there any SEO implications in such case? Should we use breadcrumbs on this page if they're not at the top? Thanks,
On-Page Optimization | | lgrozeva
Maggie0 -
What impact does cdn utilization have on SEO?
I've set up a new online store and prepping to roll out. I've implemented Amazon Cloudfront to host all of my static files: images, style sheets, javascript files and small template related images to assist in speeding up this Magento site. Any reason not to do this? What are the SEO implications of having images that arent' stored on the same domain? Does it make a difference if I refer to these files from the amazon cloudfront domain vs. seting up a subdomain like cdn.mywebsite.com? Thanks for any feedback.
On-Page Optimization | | Timmmmy0