Scripts question
-
My question is whether search engines will crawl the page before or after scripts run on the page. I have a H1 that will be replaced with a canvas by jquery script. Will search engines see the H1 or the canvas?
-
I mean 'view source' not generated source. What I tried to say is that Google will see exactly the same code as you do when you right click on a page and click 'View source code'. So to answer your first question _' I have a H1 that will be replaced with a canvas by jquery script. Will search engines see the H1 or the canvas?' _Just check the source code of your page to find out.
Javascript/ajax can cause problems for Google to index the content as far I know, but I'm not an expert in this.
-
Sorry but I'm still a bit confused.
By ”this code is equal to what you see in ’view source’”, do you actually mean “view source” or “view generated source”? Because “View source” would imply that Google sees the un-scripted html.
Could you really run javascript on a server? Do you mean that our server will run a client javascript before sending it to Google..? (Let’s say we add an A href tag dynamically by javascript, will this A tag be crawled by Google?)
Thanks!
-
Google doen't run your script, this happens on your server. When Google wants to crawl a page, it requests this url from your server. The server will run the scripts and deliver the final html to the Google crawler. This code is equal to what you see in 'view source'.
I hope this explains it a bit more.
-
Thanks, but can you please be more specific? Do you mean that search engines runs the scripts, then sees the final html – as in the html after scripts are executed? Or that they don’t run the scripts, so the “final html” is what we see in “view source” before the page is “finished” and scripts are executed?
Seems strange that Google would execute scripts. Wouldn’t that be a security risk?
-
Hi,
Search engines will index the final html, not the scripts that generate the html.
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
-
Magento Duplicate Content Question - HELP!
In Magento, when entering product information, does the short description have to be different than the meta description? If they are both the same is this considered duplicate content? Thanks for the help!!!
On-Page Optimization | | LeapOfBelief0 -
Does anyone use Genesis Framework? If so can a newbie use it and a few other questions
Hi, So as I search the wonderful land of the internet, I see this Genesis framework brought up quite a bit. I have researched it for a few weeks, but it seems like it uses hooks instead of shortcodes. So I am curious if anyone has used it? And if so what your thoughts are about it? I am a COMPLETE newbie here, so hooks look scary. I am sure with time they will seem like second nature. They claim it has airtight security. So if you have used this framework, how is this any different than an updated stock wordpress site? I understand that vulnerabilities may be in plugins and such, but if it is really airtight, that seems great. Any thoughts are appreciated as I just want the best user experience. So many people use this framework, yet my site gets if I'm lucky 1000 views each month. It is a basic site to let people know we exist. So its not like I have a popular blog with 50,000 pageviews each month. But... going into the future, I want a pleasant and consistent user experience. Maybe a wordpress theme is all you need. Maybe a framework is more for developers. Any thoughts are greatly appreciated. Chris
On-Page Optimization | | asbchris0 -
Question About On Page Grades
New to the whole SEO game in some aspects and wanted to know about on page grades. Some of the pages I got ranks of F for are actually in the top 10 in Google. Could anyone help me to explain way these pages/tags are F's with those rankings?
On-Page Optimization | | BlackEnterprise0 -
Silly question about noindex and canonical
Hi, This is probably going to sound a bit stupid, but I nevertheless want to check. We have a site that's going to have identical pages (really not my choice) for a sales reason. The two examples would be example.com/profile-name and example.com/location/profile-name Users using the onsite navigation will always end up in the latter example naturally as they have to select a location before viewing content (plus having the location in the url is nice as there are multiple profiles across different locations that have the same name). However, it's easier to sell our services when we can offer just example.com/profile-name to users for their own marketing reasons. I'd like to make the example.com/profile-name noindex follow, and have just the example.com/location/profile-name indexed, but not sure if it would be better to implement canonical tags instead? Can anyone see any potential pitfalls of using either method or does it not really make a difference (which is what I suspect, but I'd rather look stupid than get this wrong)? Thanks!
On-Page Optimization | | LeahHutcheon0 -
Rel canonical tag question
Im trying to to fix my duplicate content problem with my catagory pages in my shopping cart. I have read about adding a rel canonical tag to the page so it links back to the main catagory page. So if I add a rel canonical tag to the main catagory page it will show up on every other page for that catagory like page 1 page 2 and so on and it will have the tag linking back to the main cat. That should fix it it right? Now that being said I cant seem to add the tag invetween the head tags. I can add it to the body where I can add content. Will the rel canonical tag work outside the head tags? Any other ideas on this fix? I contacted my people that host the cart to see if they have any features to help this will see what they say.
On-Page Optimization | | Dataken0 -
Drupal SEO Question
Still trying to get a handle on all this...a lot to figure out! My site is Drupal and a few weeks ago I had my developer install an SEO Module so I could add a meta description and keywords for my pages. I have done that for the majority of the landing pages and the product pages as well. Earlier I posted a question about the use of adding the meta description and keywords to each product. The answers were mixed and pointed out the problem of the duplicate content which I am trying to figure out how to fix. BUT...when I went through my On Page Analysis grading for my campaigns one of the reasons my grades were low were because of the use of meta keywords tag. That the search engines ignore them and competitors can use them against you. So now I am thoroughly confused. I should optimize each product page with the meta description and keywords or i shouldn't? Keywords should show up in the title tag and the content....anywhere else? Help! Thanks much, Shara
On-Page Optimization | | Confections0 -
Geographic targeting general question
Hi, I've been looking at some of the Google help centre pages for Geo-targeting and it says flat out if you use for example .co.uk and Geo-target in webmaster tools US then you will not rank as well as using .net, .com and a few others they list. So if you got a UK online business and want to expand into another country then staright away your in a negative situation if you want to rank in the SE for that location.
On-Page Optimization | | activitysuper0 -
Link juice question
In theory: If i have a page with only two outgoing, do-follow links,
On-Page Optimization | | elgoog
and both have the same target,
only the first one will be counted.. right? Will that link pass 100% or 50% of the link juice? (if the anchor text is the same or different does not make any difference i think)0