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
-
One more question about rel=canonical
I'm still trying to wrap my head around rel=canonical and its importance. Thanks to the community, I've been able to understand most of it. Still, I have a couple of very specific questions: I share certain blog posts on the Huffington Post. Here's an example: http://www.huffingtonpost.ca/cedric-lizotte/munich-travel-guide_b_13438956.html - Of course I post these on my blog as well. Here: http://www.continentscondiments.com/things-munich-classics/ - Obviously the HuffPo has a huge DA, and I'll never match it. However the original post is mine, on my blog, and not on the HuffPo. They wont - obviously - add a rel=canonical just for me and for the sake of it, they have a million other things to do. QUESTION: Should I add a rel=canonical to my own site pointing to the post on the HuffPost? What would be the advantage? Should I just leave this alone? I share blog posts on Go4TravelBlog too. Example: http://www.go4travelblog.com/dallmayr-restaurant-munich/ - but, once again, the original post is on one of my blogs. In this case, it's on another blog of mine: http://www.thefinediningblog.com/dallmayr-restaurant-in-munich/ QUESTION: Well it's pretty much the same! Should I beg Go4TravelBlog to add a rel=canonical pointing to mine? If they refuse, what do I do? Would it be better to add a rel=canonical from my site to theirs, or do I fight it out and have a rel=canonical pointing to my own post? Why? Thanks a million for your help!
On-Page Optimization | | cedriklizotte0 -
Robots.txt Question for E-Commerce Sites
Hi All, I have a couple of e-commerce clients and have a question about URLs. When you perform a search on website all URLs contain a question mark, for example: /filter.aspx?search=blackout I'm not sure that I want these indexed. Could I be causing any harm/danger if I add this to the robots.txt file? /*? Any suggestions welcome! Gavin
On-Page Optimization | | IcanAgency0 -
On Site Question: Duplicate H2...
Hi All A few on-site audit tools pull information on duplicate H2 tags on pages. This implies it's a bad thing and should be fixed - is that the case? On one of my sites the tag-line is in H2 in the header, so appears on every page... Just wondering if this is something worth fixing. Thanks
On-Page Optimization | | GTAMP0 -
Canonical Question For Different Languages
My client has a site that supports different languages in the following structure: www.domain.com - English version www.domain.com/IT - Italian version www.domain/DE - German version etc.... I have set the languages up within Webmaster Tools but do I need to set up the canonical tag for all internal pages as they are basically the same but just in a different language i.e. www.domain.com/index.php is the same as www.domain.com/DE/index.php but in a different language. Thanks
On-Page Optimization | | bigfootdigital0 -
Newbie question - Optimize homepage or create new page?
Hey everyone! I'm new here and wondering if anybody could help with a question. I'm trying to optimize for the keyword "meet people". I've attached a screenshot of the Moz SERP report for the top 10 results for this keyword for Google (UK). Unfortunately my domain doesn't make the top ten - we're currently raked 11th. My domain - tastebuds.fm - has a domain authority of 53 and the homepage has a page authority of 61 which is way way above the scores for the 1st placed result. What am I doing wrong? Should I focus on competing using a page that contains the keyword eg. http://tastebuds.fm/meet-people OR should I work on improving the 11th place of my homepage by tweaking the content? Bear in mind I already have an A grade for on-page optimization of the homepage for the keyword in question. If I decided to optimize a new page... how long would it take before I ranked well for the page if the only place it was linked was from the homepage? Also what should I put on this new page? Our homepage already converts well so should I duplicate it somehow? 4ENqCPz.png
On-Page Optimization | | AlexTP0 -
Help! A couple of basic questions on dup. content, pagination and tumblr blogs.
Hi, and many thanks in advance for any assistance. According to our GWMT we currently have over a thousand duplicated title tags and meta descriptions. These stem from tabs that we have located beneath the body copy, which when you click on them display offers or itineraries (we're a travel company). So the URLs change to having "?st=Offer" or "?st=Itinerary" at the end, and are considered to be duplicating the original page's title and meta des. Sometimes the original page is also paginated, and shows the same duplication errors. What would be the best way to ensure we're not duplicating anything? Also, we have a tumblr blog, where there's single page displaying all the blog content, but also links to each blog on a separate individual page. We would like to keep the individual pages as we can optimise to target specific keywords, but want to avoid any duplication issues again. Any advice would be greatly appreciated.
On-Page Optimization | | LV70 -
Question Regarding RSS Feeds
A site I have been asked to take a look at has an RSS feed on there home page. The site offers Austrian mortgages. But the RSS feed is in the side bar and it is drawing information for Austrian News. I personally would of said that if it was to draw anything then it should be more accurately related to the site, or am I wrong? I also have seen that he has installed RSS Bomber, now it just submits his blog posts to a lot of RSS aggregators each time he makes a post. Is this a bad thing as I am not sure. I am thinking it cant be good as it is effectively automated but I would like others opinions on this. Thanks Paul
On-Page Optimization | | propertyhunter0 -
2 sites made - almost same day question
So i made 2 sites within 24 hours of each other:
On-Page Optimization | | mweidner2782
babysitters-nyc.com
and
http://nanny-nyc.com/ nanny has 530 pages index and babysitters only 10. Any idea why that would happen and what the problem would be? Thanks and happy holidays!0