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
-
Disavow Question
Hey, In webmaster tools i have 520 domains linking to my site and i disavowed some today, when i was done it said "you successfully uploaded a disavow links file with 75 URLs and 0 domains". First question, did i do this right? Second question if a site is linking to me on multiple pages on their site do i have to disavow each link or just the domain is enough. When i download the all links to my site it was around 5,000 from the 520 domains. I appreciate the help.
On-Page Optimization | | benjaminmarcinc0 -
Crosslinking Question - Footer or Header?
We own 9 fashion blogs that focus on different niches. We have Your Next Shoes focusing on shoes, Your Next Dress focusing on dresses, Your Next Handbag focusing on handbags, and so on. Previously we had links in the blog header to the other sister sites. Your Next Shoes had text links to its 8 sister sites, and so on. However, we were told that this could cause a cross-linking penalty, so we removed these links. My understanding now is that the advice we were given is not necessarily correct. We think it is useful for our visitors to see that we also operate other blogs, so we are thinking of adding back the links - this time to our footer. Basically I am looking for advise on the best way to go about this.
On-Page Optimization | | Jantaro0 -
Question about url structure for large real estate website
I've been running a large real estate rental website for the past few years and on May 8, 2013 my Google traffic dropped by about 50%. I'm concerned that my current url structure might be causing thin content pages for certain rental type + location searches. My current directory structure is:
On-Page Optimization | | Amped
domain.com/home-rentals/california/
domain.com/home-rentals/california/beverly-hills/
domain.com/home-rentals/california/beverly-hills/90210/
domain.com/apartment-rentals/california/
domain.com/apartment-rentals/california/beverly-hills/
domain.com/apartment-rentals/california/beverly-hills/90210/
etc.. I was thinking of changing it to the following:
domain.com/rentals/california/
domain.com/rentals/california/beverly-hills/
domain.com/rentals/california/beverly-hills/90210/ ** Note: I'd provide users the ability to filter their results by rental type - by default all types would be displayed. Another question - my listing pages are currently displayed as:
domain.com/123456 And I've been thinking of changing it to:
domain.com/123456-123-Street-City-State-Zip Should I proceed with both changes - one or the one - neither - or something else I'm not thinking of? Thank you in advance!!0 -
Re="tag" Question
Hello, I own the site I putted rel="tag" in categories and product links , its correct? There are a lot of categories and products , I wont get penalized right? Just making sure to know if Im doing it right , thank you for help me 🙂
On-Page Optimization | | matiw0 -
Internal link question
Hello, I was wondering if internal links should be full urls? for instance my coder might put "page-title.html" but I was wondering if its better for seo to have it be the full url "http://www.blah-blah.com/page-title.html" thanks in advance..... I love this place!
On-Page Optimization | | Superflys1 -
Question about Multi-national Websites
I am about to work on a multi-national site and need some more information about what I should consider regarding: content keyword research anything else My biggest question is regarding content. The company would like a UK version of the site with a different URL, but plan to keep the content essentially the same, with the exception of a few minor details. In this case, would duplicate content still be an issue? If so, any suggestions for working around this? Any strategy information on multi-national sites would be really helpful. Thank you! Erin
On-Page Optimization | | HiddenPeak0 -
I have a direct question about file structure.
This question is about a new file structure and SEO friendly URL's. Does a file name make a difference? I have a direct question about file structure. Our old site was formated with a URL of http://rousechamberlin.com/about_us.aspx our new site is structured http://rousechamberlin.com/AboutUs/ no file no extension. As the SEO guy of the company and not the programmer my feeling is this is killing us. Does anybody have any thoughts on this?
On-Page Optimization | | HeadWebChef0 -
Small Site Title Tag / Structure Question
Bit embarrassed to ask this question, but will ask it anyway! I have done some quite reasonable basic SEO for clients in the south of Spain with small sites and had reasonable success. My wife and I came to the Pyrenees in the south of France to take over and run bed and breakfast in a lovely old farm and some self-catering accommodation in one of the pastures (with my continuing to do a bit of work for clients too). We are running and developing the place for friends who are away 3-4 years. They had an abysmal site, so we designed one to together: http:www.loubetaspyrenees.com/ (I have given the French version because it's what I am most concerned with - there is an English version in case I can tempt you to a holiday here!) It's been very well received by users, so that's great. We have the place on about 12 agencies amd almost all link to our site, so it serves as a good showcase. Here's my issue (for the French site): It went online 11th Feb and is already doing well for more "long tail" searches, and for more local and specific searches, but is proving slow on our prime search terms. The prime market is French, and they key terms are "Gîtes" for the self-catering accommodation, and "Chambres d'Hôtes" for the Bed and Breakfast. Our key Geographical term for the French market is "Hautes Pyrenees" - it's a departmental area. In Google.fr We are around result 100 out of 600k results for "Chambres d'hôtes hautes pyrénées" and aren't in the first 200 for "Gîtes Hautes Pyrénées". This is a competitive market and we are competing with optimised and long-established agencies but still hope to do better. I know I am losing from poorly constructed title tags cannibablising the results, but cannot see how to solve this: Home Page Title tag: "Gîtes et Chambres d'Hôtes dans les Hautes Pyrénées | les Baronnies" I have two main pages on the Gîtes: Gîte for 2-3 people Title tag "Gîte dans les Hautes Pyrénées pour 2-3 personnes en les Baronnies"
On-Page Optimization | | PeterMurray
Gîte for 3-9 people Title tag "Location Gîte dans les Baronnies Pyrénées pour groupe 3-9 personnes" ("Location" means rental) Google understood the above and put us no 1 out of over 1miillion results for a search for a gite for 9 people in the south west of France ("gite sud ouest 9 personne") And 2 pages for the Bed and Breakfast: B&B in the farm building: "Chambres d'Hôtes dans les Hautes Pyrénées dans une ferme restaurée"
B&B in gite apartments with sitting rooms: "Chambres d'Hôtes dans les Hautes Pyrénées avec salon et terrasse" I am not sure how to handle the titles for the Home Page and for the 4 subpages - sounds silly, but have you any advice on how I might handle these titles better? I thought of using more general terms on the Home Page ("Holiday accommodation in the ..."), but on such a small site (18 pages in each language version) I feel that would be unwise. It seems I must try to find some way of differentiating the titles on the other 4 pages so that i am not cannibalising but where there are so few alternatives I am not sure how! Oh dear, sorry this was so long!0