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 for a Domain which contains Multiple individual sites
My website structure www.example.com (wordpress installation number 1)
On-Page Optimization | | kevinbp
www.example.com/forum/ (vbulletin installtion)
www.example.com/shop/ (wordpress installation number 2) Each of these individual pages contains a fresh wordpress/vbulletin installation with their individual admin control panel. Am i doing this website entirely wrong? Is my website considered as a single website or does Google classify it as 3 different websites? My Ranking page is, www.example.com, and by blog post is www.example.com/forum/blog. When i do a link within my blog entry to my main ranking page, does it count as external or internal link?0 -
Bold & Italics Best Practice?
Hi All, Does anyone know the official best practice use of bold and italic fonts? If I have a long page of text- 800 words + I usually bold a few sentences to allow the user to be able to read only the bold on the page, and still make sense of the article. By reading all the bold it will kind of make sense and the user gets the point of the article. This wasn't really done for SEO purposes, but so the reader gets to the bottom of the page in a reasonable amount of time, and gets all the key points and facts of the article. I was advised not to do this and to just bold/italic the keyword/phrases the article was written to rank for. I would like to know anyone else's opinion/strategy on using bold/italics effectively and within best practices. What's the official word? Thank you for your help. Ian
On-Page Optimization | | cookie7770 -
Paying someone for SEO help?
Moz has been very helpful but since my site was hit by Google Panda and I am getting very little organic traffic, I am thinking about having someone who really knows SEO take a look and give me some help. However, I have no idea how to find someone reputable. Any advice for hiring someone for SEO help (on a budget?)
On-Page Optimization | | 2bloggers0 -
SEO for Online Auto Parts Store
I'm currently doing an audit for an online auto parts store and am having a hard time wrapping my head around their duplicate content issue. The current set up is this: The catalogue starts with the user selecting their year of vehicle They then choose their brand (so each of the year pages have listed every single brand of car, creating duplicate content) They then choose their model of car and then the engine And then this takes them to a page listing every type/category of product they sell (so each and every model type/engine size has the exact same content!) This is amounting to literally thousands of pages being seen as duplicates It's a giant mess. Is using rel=canonical the best thing to do? I'm having a hard time seeing a logical way of structuring the site to avoid this issue. Anyone have any ideas?
On-Page Optimization | | ATMOSMarketing560 -
Changing to Friendly SEO Urls
This is my site, example of a product : [Link removed] Would I lose rank in Google for changing all to friendly SEO urls? Thank you
On-Page Optimization | | 7liberty0 -
Modifying Well Established & Well Indexed Content
I have a page that is very well indexed and has a 1st position ranking in google. It is the best landing page in my site. That being said, it's several years old and I honestly think it could be better. The images could be enlarged, the the images could have fancy box enlargements instead of just linking out to flickr, there could be more content about follow up projects that people have done. I'm noteably nervous about changing such a clutch piece of content on my site. I do want to improve the content for users, not just make it more SEO friendly (it's already SEO'd), but I'm afraid that any change could cause a set back in ranking. Am I being afraid of nothing, should I just go for it and improve my content, or should I be extra cautious when editing well indexed content like this? Thanks for the advice
On-Page Optimization | | CPollock0 -
Wordpress permlinks SEO question
What are SEO advantages or disadvantages of the following - /%postname%/ - adds a trailing / /%postname% - no trailing / /%postname%.html - creates .html URL Thanks
On-Page Optimization | | SamBuck0 -
SEO Plugins for WordPress
Hi, Mozzers- I'm re-evaluating my SEO WordPress Plugins. What are your favorites and why? Are there others that you avoid and why? Thanks!
On-Page Optimization | | lhc672