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 -
Looking for an SEO Expert
We're overwhelmed with client work and looking to hire an SEO professional to handle our local rankings and give us a fresh perspective. Feel free to message me privately or reply here. Thanks!
On-Page Optimization | | ScottImageWorks0 -
How updating a post can influence seo
I have just read this great post from moz blog: http://moz.com/blog/google-fresh-factor But I haven't found nothing about updating post date. If I edit an old great post (now ranked 2nd after several months in 1st serp position) does it be better if I also update the date of the post in the wordpress post edit page? Thank you very much and sorry for my poor english. Bye, Dario.
On-Page Optimization | | Italianseolover0 -
Communities Served on Page for SEO
Hi, We have an urgent care facility outside of our hospital located in an other location and we would like to increase the organic seo for the highest traffic surrounding towns. I have toyed with the following ideas but would like to know what everyone thinks is best. 1.) Just included "proudly serving patients in Area 1, Area 2, Area 3, Area 4" on the bottom of the page. 2.) Create a page that says areas served... then each page would have a non-duplicated and original content for that area. 3.) build a microsite for the urgent care site and optimize with content from option 2 above and just add option one to our main website.
On-Page Optimization | | sphcs0 -
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 -
Does Commented HTML Code Get Spidered?
I have a change, perhaps temporary, to my web store that I will be making. I am wondering if the code that I will comment out () gets spidered?
On-Page Optimization | | lbohen0 -
Google Fonts & Site Speed
Hello, Does the use of one google font slow down a website enough to effect load speed and thus rankings? Here's the ones we're choosing from: www.google.com/webfonts How do we know if the one we choose is too slow? Thank you.
On-Page Optimization | | BobGW0 -
SEO and Pagination on search results
Hi Our new site is still in beta mode, and I just wanted to check from an SEO perspective that on search results and on the pagination at the bottom of the page, is there anything we need to do so its compatible with the search engines and not have duplicate content issues etc I have implemented search friendly URL's, but I would welcome any other issues or suggestions you have that will help improve the sites SEO performance The URL of a search results page is http://www.cheapfindergames.com/category-arcade-and-platform
On-Page Optimization | | ocelot0