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 -
Image Titles and Descriptions Question
Hello, I have a question about optimizing the SEO on my pages through image titles and descriptions. There are a few times on my website that I use the same image on multiple pages. I am under the impression that giving it a title such as "social-media-marketing-agency-graphic.jpg" will help the SEO for the phrase "social media marketing agency" on that page. My question was, if I want to use the same image on multiple pages, am I better off uploading an entirely new image with a new title to make it more relevant to the new page? Or will this not make large enough of a difference? Or is there an easier solution? Please let me know your thoughts on how to best optimize the pages
On-Page Optimization | | brightsocial0 -
Question about multiple versions of home page
Hi guys, I'm having a question, answer to which i'm unable to find anywhere. I browesed the whole internet lol. So the question is about multipple versions of the home page. In particular, i want to know how should i deal with home page URLs with this extention: /index.html All the rest possible versions of home page i know how to deal with but this one "/index.html" i don't. I did add a cononical tag to it but i'm wondering whether or not i should add 301 redirect to chosen version og the home page (let's say it is www.mydomain.com). Please advise the best practices on how to deal with this. Thanks in advance!
On-Page Optimization | | odmsoft0 -
Dupelicate content home page and custom page question
I am working on a website that got hit by the penguin update. Didn't get hit terribly bad, but dropped from number one to number 9. As I'm going through the pages, the theme and content is a mess. To give an example, say the site is about custom colored marbles. The main page content covers custom colored marbles, custom promotional marbles, custom glass marbles, etc. Custom colored marbles is mentioned and covered on all pages, which I am going back and trying to make each page theme specific. There is also a custom page, so I am at a cross roads on how best to employ the focus of the custom page and the home page. I am thinking the home page should emphasize colored marbles, and the custom page should emphasize custom colored marbles. My fear is that making such a drastic change will bounce the site completely off front page and that it will take time for the custom page to come up in rankings. AS it stands now I am confused as to how it even ranks on first page as there's two pages with custom colored marbles emphasis. Id like to clean this up as much as possible so there are no big hits with future google updates, but I don't want the site to drop off either as that would be hard to explain to the owner. Yeah, we are cleaning up your site and making it google compliant and in so doing you no longer rank on first page. That won't put food on the table. Thanks for any advise on this.
On-Page Optimization | | anthonytjm0 -
Title tag question
Hi, If I wanted to rank for 'cheap football boots' and 'football boots' which tag would be the best option: 1. Cheap Football Boots (notice both keywords im targeting are included) 2. Cheap Football Boots, Football Boots (both keywords separate) and the keywords sit on an EMD (cheapfootballboots.co.uk) Cheers
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 -
Product Title Formating Question
The majority of the products I sell require lengthy product titles, I have 600+ items that have titles over 70+ characters. In the interest of reducing the character count (Product Feeds) I'm trying to eliminate unnecessary "stop words" in the titles, such as "and", "with" etc.. I've listed an example of a current product listing below, followed by two different formats to reduce the character count. Which one if any is better for SEO or should I leave my titles alone and stick with my original format? Current Listing Example: DeWalt Dual Comfort Safety Glasses with Black Frame and Clear Anti-Fog Lens Suggested Listing Example: DeWalt Dual Comfort Safety Glasses-Black Frame-Clear Anti-Fog Lens DeWalt Dual Comfort Safety Glasses/Black Frame/Clear Anti-Fog Lens
On-Page Optimization | | MEldridge0