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
-
Does Plus Sign "+" in url affect SEO and Ranking?
there are customized pages on the client's site, they contain brand pages related to Samsung, iPhone, ZTE, LG, Motorola, and HTC Mobile phones.
On-Page Optimization | | dietsuave
For Example:
https://www.unlockninja.com/unlock-apple+phone
https://www.unlockninja.com/unlock-zte+phone
https://www.unlockninja.com/unlock-samsung+phone
Should I recommend them to change the URL structure. ?0 -
Metered paywall & seo
Hello In our site we are planning to add a metered paywall, a kind of soft paywall, in which users can see X pages on the site with no restriction, and then on the next page (X+1) they are blocked and need to register. How will this affect SEO? Should we cancel the block on search engine spiders? If the block is just JS popping up a full-screen popup, but the actual content is loaded, is that ok? or another method should be utilized? Thanks!
On-Page Optimization | | idosmaccount0 -
Generating Dynamic Meta Titles for SEO - Advice?
Hi, I'm working with a new client that works with a lot of suppliers and they want to have their titles built in a specific way. If I generate a template (so to speak) will generating dynamic meta titles have a negative effect on their SEO and is this even possible? If so, what would be the best way to handle this? There is approximately 100 suppliers. Any feedback/advice is appreciated!
On-Page Optimization | | daniel-brooks0 -
Ranking & Visibility suddenly Down for my website
Any google updates or, can anyone tell me what google running, web ranking down, majority keywords showing on 1st pages right now those are on 3rd page, so is there any specific reason, or any solutions plz.. this s my website www.iqlance.com can anyone help me to audit and what was the issues facing exactly..
On-Page Optimization | | harry5501 -
SEO Content Revolution Question
I was wondering if articles written about questions people are asking will help my website rank better. For example let's say I wrote an article answering the query, "What Hair Dye Does Angela Merkel Use?" or, "Is Hillary Clinton Thinking of Running for President," and they rank well on google, and in turn they get viewed a lot by searchers because it answers their queries. Would this help my website as whole start ranking better? Thanks!
On-Page Optimization | | OOMDODigital0 -
Breadcrumb position SEO impact
Hi all, Our UX designers are working on a new page design, and the breadcrumb position looks somewhat strange - it's almost in the middle of the page. The new page looks like this (the breadcrumb is below the head banner), but it's a showcase page that contains about 150 items. Each of them has a small thumbnail, title, category and short description. They've decided to use the head banner's place and have there all items, grouped in categories that visitors can browse. The breadcrumb menu is at 900 pixels from the top of the page In other words, you have the major part of this page content in front of the breadcrumb menu. Are there any SEO implications in such case? Should we use breadcrumbs on this page if they're not at the top? Thanks,
On-Page Optimization | | lgrozeva
Maggie0 -
Disadvantages & Advantages for this e-commerce URL Structure
Hi all, Just a simple question. What's the disadvantages/advantages to using this URL structure for an ecommerce site: **Category structure: **/category **Subcategory structure: **/subcategory **Product structure: **/product Compared to the standard: /category/subcategory/product Thanks, Nick
On-Page Optimization | | NickPateman810 -
Value of PDF's in SEO
I have a client who has a lot of information in PDF form. They think they should move some of it over into HTML pages so it indexes better. Is there a benefit to converting these PDF's into HTML pages? It seems to me that HTML pages would be good, IF they are relevant pages that could be used online.
On-Page Optimization | | lvstrickland0