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
-
Prestige Kew Gardens Domain SEO
Hi Team, I have been doing off page seo for my prestige kew gardens for quite some time. It has already been 5 months. till recently is was ranking in range of 200. Now I am able to get to first page from last month. But still I feel I am missing something to get it on top. ON Page Grade for this domain is A. I have used all the moz tool to check any on page issue. Everthing seems to be proper. Can anyone help me on this? http://www.prestigekewgardens.org.in/
On-Page Optimization | | mithungowda0 -
ECommerce & Reviews when generated by 3rd Party uses Javascript
Hi all, I am trying to optimize our product pages and I know one of the important factors is showing customer reviews. While we have plenty of reviews to show they are collected by a third party (Shopper Approved) and the way we have been told to display them on our pages is via a Javascript. My question is, is this sufficient for search engines to be able to crawl and interpret the Javascript or are we missing out on user generated content since it is displayed via Javascript. If so are there best practices or recommendations to help us? Thank you!
On-Page Optimization | | MyFairyTaleBooks
Dinesh
http://www.MyFairyTaleBooks.com <- this is the site in question if it helps.2 -
On-page SEO optimization
hi there! Is it possible not to be in the first 20 or 30 positions in the SERPs after executing onpage SEO actions (keyword optimization, metatags, ....) even for keywords for which there's not "too much" competition? Is there a way of visualize the pages indexed by the google bot? (the pages especifically, not the number) in order to discard indexing problems? Thank you!
On-Page Optimization | | juanmiguelcr1 -
Blogs & CMS setup and integration
Hi Guys, I'm quite new to all things website wise. I understand the 'basics' of SEO (i think) and i'm alright with html but my experience stops there. Since i signed up to SEOMOZ, i've realised the importance of SEO and therefore our company has now employed 'an expert' to help us to go forward who happens to work for our web hosting company. Throughout the discussions, they strongly emphasised the importance of blogging and having a proper blog setup on our site and so we went along with the suggestion along with the SEO. Before we began, i went away and redesigned our site updating a lot of the content, the layout etc to basically give them a much better starting point because ultimately it would only benefit us. They have just started the work this month and to say i'm underwhelmed is an understatement!! With regards to the blog, as i didn't know what they were planning to do, i created three links at the bottom of our pages which looked like blog posts, a general blog page, and some blog posts which are all simple html pages. I assumed that they would then go away and create the blog thereselves and then obviously add it to our site. They have just come back now and said to me that as our site doesn't have a CMS, they will have to forward me the weekly posts and i will have to add them to the site myself and post them to our facebook and twitter pages. I am not particularly impressed with this as this is what we have paid just over £800 for which supposedly included them setting it up and managing it and did not include the SEO which is a lot of money for a small company as ourselves. What i wanted to know is that from our site as it stands now: http://www.customdesignedcable.co.uk, would it be difficult to include some sort of blog system that would integrate into our pages on the footer and the blog page or would i have to redesign the site through something such as joomla? I have never used joomla and i've only just found out that it exists. I'm asking on this forum as all of you guys know what your talking about and before i go back to them all guns blazing tomorrow, it would be great to be 'well up' on how difficult it would be and what the easiest ways would be to do it just to give me some ammo because i think they are talking out of there backsides! Any help you could give me would be greatly appreciated!! Big Thanks Guys!! I look forward to hearing from you. Chris.
On-Page Optimization | | Chris_CDC0 -
An ecomerce seo question
Looking for a few opinions on this please...Trying to reduce the number of pages I have to seo to rank on my websites and at the same time avoid the google over optimisation issues. Previously on our ecomerce websites we would have a category page for, say, 12 times, we would then seo that page for generic terms related to the page; ie, blue dress, cheap blue dress, blue party dress etc. The individual product pages would then be seoed with the title and h1 tags containing the exact product name and the url containing the product name too. This worked fine but we are suffering from some duplicate content issues of late (the products are mixture of few unique items and probably 95% imported affiliate datafeeds) as we have an average of 80,000 products per store we have neither the time nor the staff to rewrite everything (the products update daily directly from the merchants so would need to be done daily) What we are planning on moving toward is blocking the individual product pages from Google and instead putting all efforts into the category pages. The category page will contain plenty of quality unique content related to the category so the only duplicate content would be a line of the product name and price. Whilst we would still rank the category page for broad keywords we also would like to now rank the category page for 16 individual product names as there is a good profit to make made by the sheer volume of product names we plan on ranking for. Obviously we could not get all the products into the url and the page title as that would be silly but would it be acceptable to have multiple h2 tags on the page, each with a different entry, the product names (H1 will be saved for the category name). We can easily bold these keywords to help in the optimisation as per the seo moz onsite analysis tool and we can add image text to ensure the product name is featured at least twice on the page. As so few sites actually seo for the long tail product names, most retailers rank by virtue of their domain quality alone, our onsite seo doesn't have to be 100% but getting the best we can out of the page will help the efforts. Many thanks Carl
On-Page Optimization | | Grumpy_Carl0 -
Does concatenating two words make them lose their SEO value
I'm working with a client whose product titles are things like "InternetSecurity" and for branding purposes has thus far required any reference to the products be concatenated in this fashion (on page, links, URL, title tags). It seems to me that would greatly reduce their SEO relevance. Any thoughts? Thanks, Mark
On-Page Optimization | | DenverKelly0 -
SEO Plugins for WordPress
Hi, Mozzers- I'm re-evaluating my SEO WordPress Plugins. What are your favorites and why? Are there others that you avoid and why? Thanks!
On-Page Optimization | | lhc672 -
German SEO
Just a quickie, Does anybody know of any strong German SEO agencies? Many Thanks Sean
On-Page Optimization | | Yozzer0