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
-
SEO - Keyword Salarpuria Sattva East Crest
Hi, I have been doing off page optimization and targetting two key words. Salarpuria Sattva East Crest and Salarpuria East Crest. I have been ranking well on second one. But the 1 keyword in not appearing first page. Can anyone show some light. My website is http://www.salarpuriaeastcrest.home-adda.com/
On-Page Optimization | | mithungowda0 -
How will it effect SEO to have multiple h1 tags on a page?
I have a client who recieved this advice from his marketing consultant: "If there are multiple h1 tags on a page, this can confuse Google and it may have a negative impact on the keyword rankings. If you could ask your web developer to go in and remove the h1 tags on the header images that would be helpful. This way it will be easier for Google to index your site and will help your keyword rankings." How will it effect SEO to have multiple h1 tags on a page?
On-Page Optimization | | GRIP-SEO0 -
Re-naming pages without affecting SEO
Due to the management software used for a lot of our websites, the URLs for specific pages appears as: brand.com/page/pagename/number I want to add slug URLs so that they appear as: brand.com/pagename First of all, do you think this is an effective use of my time and will it significantly benefit SEO in the long run. Secondly, these pages have developed a decent PA over time and I don't want to lose that. Will adding 301s for all the renamed pages be enough to not have a negative effect?
On-Page Optimization | | maxweb1 -
Google Authorship for SEO Content Writers
I am interested to know the best way to go about about Google authorship on blog articles written for a client. For example is it a bad idea for an SEO content writer to publish articles under their own identity, what are the potential footprint downsides to this?
On-Page Optimization | | Clicksjim1 -
Please review page for on page SEO
I'm working on an adult dating site review blog and am hoping to build links to the category pages. It's a wordpress blog so the posts are categorised by topics. However can you tell me if there is enough content on the page for google to identify what the page is about? The problem is that the content of each category pages is pulled from the posts. What I think is needed is some static text on the page 2-300 words that use the keyword. Here's an example of a page targeting the keywords 'online dating'. http://www.top-10-dating-reviews.com/category/online-dating/
On-Page Optimization | | SamCUK
[editor's note -- thumbnails on site may not be appropriate for some workplaces] Will the page rank like this if there are a good amount of authorative links or does the page itself need work?0 -
Disclaimer in footer - is it affecting my SEO?
For legal reasons I am required to include a 266 word disclaimer in the footer of every page of my credit card comparison site creditcards.com.au. My question is in 2 parts: is this indexable content likely to be hurting my SEO? if so, what is the best way to include the text in the footer but prevent search engines from indexing it? Thanks.
On-Page Optimization | | OMGPyrmont0 -
Landing Pages for Generating Leads - Must They Be Optimized for SEO?
Question about landing pages: There are landing pages created just for classified advertising. They are stand alone pages. And, are not linked to website (although one can
On-Page Optimization | | BlueBird33
get there via the url) The purpose of these pages is to generate leads. They are keyword rich in title, head and content Content varies, only by 30% Should those pages be optimized like websites? They have a nofollow tag, is that enough? Thank you for taking the time to answer. Peggy0 -
SEO for E-Commerce
Hello Guys, First of all, I wanna say that I just have some 1-2 years experience in SEO, I´m not a GURU or expert ok? So, take it easy... I have one costumer which wanna develop a E-COMMERCE focusing SEO and best pratices of web development. What care should I have? I mean the most important issues... From the coice of domain name to very specific point. What is the main mistakes SEO made at develop a E-COMMERCE? Thanks so much 😃
On-Page Optimization | | augustos0