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
-
Unsolved I have lost SEO Ranking while removing www from domain
I have lost search SEO ranking for 4-6 core keywords while removing www from domain switch.
On-Page Optimization | | velomate
Referring domain: https://cashforscrapcarsydney.com.au/ Earlier the domain was in the format: https://www.cashforscrapcarsydney.com.au/ But when I checked the search result, search engines had not yet crawled to the new format. Let me know if the server change or any algorithm hit might cause it. Also please share the feedback on - does removing www from the domain losses keyword ranking. Helpful replies are needed.0 -
HVAC & Air Conditioning - 1 page of 2 ?
Hello all! This has been an on going issue for us trying to rank an air conditioning repair company. The 2 strongest keywords for us are both HVAC Repair and Air Conditioning Repair. The main question is.... Should this be 1 landing page or 2? I think google may recognize HVAC and Air Conditioning as the same thing, because for some crazy reason my air conditioning repair page ranks for the keyword HVAC repair. My HVAC repair page is actually nowhere to be found. I am coming across the same issue with other keywords like HVAC service , and Air Conditioning Service. Or HVAC Maintenance and Air Conditioning maintenance. Any help would be greatly appreciated
On-Page Optimization | | interstate0 -
Choosing a title tag in seo (H1 or H2 or H3)
I look many times on google that what is the best tag to set in title for seo, H1 or H2 or H3 In many forums and sites they are asking that you need to put only H2 tag in title and someone ask to put H1 in title and i am confused, Some body tell me the correct tag for seo in google, or any other search engine.
On-Page Optimization | | seom20140 -
Wordpress & SEO Markup
Buon Giorno from 6 degrees C wetherby UK 🙂 I'm close to commissioning a designer to create a wordpress driven site but I'm anxious around the standard of the markup. Specifically I need pages to have the classic unique title tags, one H1 tag per page and contnet in p tags.
On-Page Optimization | | Nightwing
Now I know theres a wordpress plugin claiming to empower the administartor to have control but are there any icebergs ahead I need navigate to ensure my sites meets Google optimization guildlines? Any advice welcome 🙂1 -
Give me your SEO Review
Hi Mozzers, I've been working on redesigning and revamping this site, http://www.canvaspaintings.com. Their domain and keyword are a match but not ranking #1. Some initial things I feel that needs to be changed are the links on the side and top bar, viewing the on page report, it does have a lot of links on every page. Trying to figure out how to remove them without having the top nav look empty. Previous category descriptions were written by possibly an article spinner or keyword stuffed writer. Need to start building more links, although PR5, it doesn't rank too well. Let me know your opinions and thoughts, I would love to hear them out. TMI!
On-Page Optimization | | William.Lau0 -
SEO for Japan
Google and Yahoo are the two major search engines in Japan. You can search using Western characters, and you often see English language results with Japanese (Chinese) characters next to them. As I don't speak Japanese, how do I approach SEO for my Japanese-language site? would appreciate any experiences and educational sources on the topic.
On-Page Optimization | | KnutDSvendsen0 -
Excessive Internal Links & links to same location
Hi, When Google is counting internal links on a page and it comes across two links to the same url, do both of the links count towards Excessive Internal Links? The reason I ask is that on our website we allow users to navigate through the website in different ways (either by dropdown menus or side menu or through breadcrumbs); which cause some links to appear multiple times on the same page. Any thoughts? K.
On-Page Optimization | | soltec0 -
German SEO
Just a quickie, Does anybody know of any strong German SEO agencies? Many Thanks Sean
On-Page Optimization | | Yozzer0