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
-
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 -
One question about the domain choice.
Hi guys, I'm an Italian Web marketing and I'm studying SEO since some moths. First, sorry for my bad english.... 🙂 Second, the question: My Italian blog is going really GREAT in terms of popularity and incomes and know I want to bring it in english language with the help of a professional translator. The choice that I have to take is about the future domain of the english blog. My Italian blog has as url mynameandmysurname.net I don't really like to make the english blog appears like myitalianblogurl.net/english because I think it's a little bit confusing and not professional. I have also thought the idea to make a sub domain like blog.myitalianurl.net. What about the WPML plugin? Do you think it's a great choice? I don't like it because it's confusing and it affect my italian blog. Or maybe is it better to create a new branded blog with different domain? It can be an idea but I think that If I chose this way I will lose all my seo efforts of the last years 😄
On-Page Optimization | | Italianseolover0 -
Author snippet image in results, question!
Hi, Quick question really, I can see how a Google+ profile picture showing up in the results can increase CTR and even trust but would this be a no no for a normal website? I mean if you had a website which offered personal training, so a brand rather than an individual would you not use this snippet? I've seen some website, even ecommerce sites using this tag to just increase their CTR.
On-Page Optimization | | Bondara0 -
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 -
Blog Question
Hello! I try to add as much fresh content to my site weekly, I do also have a blog that I update 3 times per week. Will google crawl frequently if I am updating info on my wordpress hosted blog when my blog name is www.blog.mywebsite.com? and the sites name is www.mywebsite.com? Will they treat them as separate domains? Thank you!!
On-Page Optimization | | TP_Marketing0 -
An ecomerce seo question
Looking for a few opinions on this please...Trying to reduce the number of pages I have to seo to rank on my websites and at the same time avoid the google over optimisation issues. Previously on our ecomerce websites we would have a category page for, say, 12 times, we would then seo that page for generic terms related to the page; ie, blue dress, cheap blue dress, blue party dress etc. The individual product pages would then be seoed with the title and h1 tags containing the exact product name and the url containing the product name too. This worked fine but we are suffering from some duplicate content issues of late (the products are mixture of few unique items and probably 95% imported affiliate datafeeds) as we have an average of 80,000 products per store we have neither the time nor the staff to rewrite everything (the products update daily directly from the merchants so would need to be done daily) What we are planning on moving toward is blocking the individual product pages from Google and instead putting all efforts into the category pages. The category page will contain plenty of quality unique content related to the category so the only duplicate content would be a line of the product name and price. Whilst we would still rank the category page for broad keywords we also would like to now rank the category page for 16 individual product names as there is a good profit to make made by the sheer volume of product names we plan on ranking for. Obviously we could not get all the products into the url and the page title as that would be silly but would it be acceptable to have multiple h2 tags on the page, each with a different entry, the product names (H1 will be saved for the category name). We can easily bold these keywords to help in the optimisation as per the seo moz onsite analysis tool and we can add image text to ensure the product name is featured at least twice on the page. As so few sites actually seo for the long tail product names, most retailers rank by virtue of their domain quality alone, our onsite seo doesn't have to be 100% but getting the best we can out of the page will help the efforts. Many thanks Carl
On-Page Optimization | | Grumpy_Carl0 -
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