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 before products on ecommerce site
Our company plans to quickly launch an e-commerce site to sell religion themed banners (religionbanners.com). We'll have our products up on the site in about a week. Should I block Google from accessing the site during this period? Is there anything wrong with starting simple SEO tasks such as submitting the site map on Google Search Console prior to us having the products on the site?
On-Page Optimization | | art_litho0 -
Home Page SEO and city specific targeting?
From What I have read you should target one keyword for each page on your site with the exception of the home page. Is this correct? If the most searched keywords for a Dentist in the area are Dentist "city name"
On-Page Optimization | | scott315
Cosmetic Dentist "city name"
Family Dentist "city name" Should you try and add content on the home page with h1 tags of each of these? If so then what about the page title/url Also if you are targeting keyword Dentist "city name" but like 4 different cities, should you have a separate page for each of this cities and then if so would that not be duplicate content with the exception of city name? Thanks1 -
Will ReDesigning my website negatively affect SEO?
I currently have a one page website which lists all the company information on one page [domain name is www. bwd . co . za]. It uses javascript for navigation. My challenge is that the layout is outdated and I would like to update it with a high quality WordPress theme which will not be a one-pager. Currently on Open Site Explorer the website has a domain authority of 30/100 and page authority of 41/100. I've worked hard to push the numbers to get to where they are hence I'm a bit concerned. Will re-designing my website negatively affect SEO?
On-Page Optimization | | bonganig0 -
Disqus Comments or IntenseDebate for eCommerce. Can It HELP???
Anybody using any of those? Do you have example of eCommerce store using it? Will it help ranking? Any thing I should know about those ''Comments'' plug-in? Thank you, BigBlaze
On-Page Optimization | | BigBlaze2050 -
Local SEO - Rich content and list of towns enough?
I'm working on creating pages to target local SEO. I've created pages for example 'wedding band london' with useful content and optimised them with title tags, alt tags etc and will continue to do so for major cities and queries where there are significant search volume. However, I also want to pickup longtail local search queries such as 'wedding band camden' etc... Will adding a list of towns somewhere on the page for each city or county help drive traffic to the site from such queries? Is so what's the best way to structure the page?
On-Page Optimization | | SamCUK1 -
Do Schema.org changes impact local SEO
I've reviewed the various presentation and blog posts from SMX advanced regarding local SEO and I didn't see any mention of Schema.org and microformats. Has any research or case studies been presented supporting that implementation of Schema.org microformats will improve local results? Here is one example where I've implemented the basics in the address info of the footer. http://bit.ly/lZQYeg Any tips on how to further optimize with schema.org markup?
On-Page Optimization | | DotCar0 -
How many keywords / phrases can you SEO for?
Might sound like a bit of a daft question to you pro's but here it goes... I am been doing in house SEO for a company for a short while and since I have been managing it things have moved quickly in the right direction but I find myself limiting our SEO efforts to three key terms. Is this usual? The reason I am doing this is because I find that on page SEO is only really possible with those amount of terms (with regards to title, description, key word density, seo copy, on page links etc). I guess that what I trying to stay is: If I push on page opitimastion to more key terms will it be detrimantal to our current efforts? and Is SEO possible for additional key phrases which are not on page optimised?
On-Page Optimization | | RikkiD220 -
The SEO and CRO Value of an Image Next to Page Content
If given the choice to add an attractive stock photo to a conversion focused page, do the pros out number the cons in terms of SEO and CRO. Some pros are that you can include the keyword in the image filename and image alt tag. It can also increase user experience by making the page more attractive. Some cons might be that it increases page load time which can have a negative impact on SEO and user expereience. Also the visitor might get distracted away from the lead form button.
On-Page Optimization | | SparkplugDigital0