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
-
Canonical question - Would this create some sort of crawler redirection loop?
What happens if a canonical link, links to the url with / but the main url does not have the / For example: rel="canonical" href="https://www.exampleURL.co.uk/"> Main URL - https://www.exampleURL.co.uk (without the /) 301 Redirect https://www.exampleURL.co.uk/ to https://www.exampleURL.co.uk Would this create some sort of crawler redirection loop?
On-Page Optimization | | Evosite10 -
Ecommerce Canonical Question
Hi all, first question (eek) Could I pick the brains of fellow users around an issue we are having with canonical urls on a magento website. At the moment we do not have these enabled as it seems to break our indexing. Cut a long story short, we have thousands of products but haven't rewritten many of the descriptions from the manufacturers yet and so have noindexed all the product pages (freeing them as we go). The goal, for now, is to pull in traffic via the filtering options we have on the site The goal, for now, is to pull in traffic via the filtering options we have on the site. For example, if you go to Dresses, there then are several filtering options which would allow you to choose a colour, shape and material - if you wished to filter that precisely. These filtering options are all crawlable and so we would then have a page that google could index for, for example, Green Lace Maxi Dress. All good there, few people search for specific products and a lot search for types of products so we are covered. To get back to the issue at hand. If we enable the canonical option on our magento plugin it will stop us from being able to target these terms. Whereas the filtering option would create domain.com/dress/green/maxi/lace with the page title of Green Lace Maxi Dress, if we enable the canonical part of the seo plugin the canonical link which would be added to the page would be - instantly removing our ability to rank for longer tail dress related searches (we are not going to compete with the big players on the premium terms, yet!). There are alternative plugins we can buy for magento to add the correct tag, however, if every page's canonical just points back it itself like this, is there really much point spending nearly $1000 on the 4 licences we would need to cover our range of sites. Is it really necessary, in this case, that we have a canonical for the product filtering? Sorry for the long post, hope it made sense. Thanks for any assistance.
On-Page Optimization | | DSCarl0 -
Ecommerce question - overoptimisation
Hi there, I'm the owner of this site http://goo.gl/76Mrbd and I have a newbie question We have a large number of vintage clothing items, and for SEO purposes I would like to rank for keywords "vintage insert designer name". I've been titling all our items with the phrase "vintage insert designer skirt/dress/pants etc" - but I've noticed that when we google these phrases - an example being "vintage moschino" we don't rank for them at all, despite the fact that each individual page gets a decent "page optimisation score" for that particular keyword. Many people have suggested to me that the reason this is so is because we're using the keyword too much on our site, but I can't get my head around how to fix this. What would be the best way to restructure our product descriptions so that we can fix this? Thanks in advance
On-Page Optimization | | clare_f1 -
2 Canonical questions
QUESTION 1
On-Page Optimization | | Marketing_Today
I'm working on a site where a canonical link is implemented as That's not the normal format that I am used to, as I would have written it as Is that a problem? QUESTION 2
Why do so many sites these days have a sitewide canonical tag which refers to itself as the canonical?
For example: http://www.site.co.uk/page has a canonical of0 -
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 -
Summarize your question.Images being seen as duplicate content/pages
My images suddenly are appearing in my crawl reports as duplicate content, without meta tags, this happened over night and cant figure out why.
On-Page Optimization | | RBYoung0 -
SEOMOZ tool - on page optmization question
Ok, I had the tool examine a page and while I got an A, it did say this..... Avoid Keyword Self-Cannibalization Easy fix <dl> <dt>Cannibalizing link</dt> <dd>"Kitchen Storage Racks", "Home Storage Racks", "Garage Storage Racks", "Wine Storage Racks", "Bicycle Storage Racks", and "wine storage racks"Explanation</dd> <dd>It's a best practice in SEO to target each keyword with a single page on your site (sometimes two if you've already achieved high rankings and are seeking a second, indented listing). To prevent engines from potentially seeing a signal that this page is not the intended ranking target and creating additional competition for your page, we suggest staying away from linking internally to another page with the target keyword(s) as the exact anchor text. Note that using modified versions is sometimes fine (for example, if this page targeted the word 'elephants', using 'baby elephants' in anchor text would be just fine).</dd> <dt>Recommendation</dt> <dd>Unless there is intent to rank multiple pages for the target keyword, it may be wise to modify the anchor text of this link so it is not an exact match.</dd> </dl> The keyword that was optimized was "storage racks". In the explanation it says that baby elephants is fine if elephants is your keyword so why isn't wine storage racks or kitchen storage racks ok what is the difference? why is mine cannibalizing but baby elephants is not? This may be very simplistic to you all but I'm learning as i go, thank you in advance
On-Page Optimization | | stacksofracks0