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 -
Duplicate content question
Hi I have a site that is run off one CMS system but has 3 different web addresses. One is a comic shop, one is a toy shop and one is a game shop. Now due to the nature of what we are selling some of the products we are selling on both or all 3 of the sites. I was wondering as to whether this would affect my ability to rank in google and if i would be penalised for any duplicate content? Thanks in advance
On-Page Optimization | | TheZenAgency0 -
Site restructure question
Our site was deigned years ago to target customers in specific cities, now we've grown beyond this and I believe it is time to change the site structure.
On-Page Optimization | | PM_Academy
Ignore the 302 from the root page. Current structure: (assuming you've never been to our site before) projectmanagementacademy.net 302->/select-location.php /select-location.php -> /city-name/pmp-training.php This page was meant to be a "homepage" for each city, pointless page really /city-name/pmp-training.php -> /ciy-name/product-name.php These pages are for each individual product My suggested site structure: /city-name/pmp-training.php becomes projectmanagementacademy.net no more redirect /city-name/pmp-training.php gets removed and 301 to root page. /product-name.php each product's page and you would select a location when necessary (some products are online only) would 301 each /city-name/product-name to corresponding product page /product-name/city-name.php could add these pages if we still wanted the city name in url for city specific products My thoughts here are /product-name.php would receive a higher % of link juice because there are fewer page between 2 vs 4 if you came to the root page. and 2 vs 3 if you came from the select-location page. Also instead of being split between over 50 locations, all these would be together on one page. Your thoughts? Would this change improve our SERP for those product pages? Would we see a drop off in traffic if we did this? How long, if done correctly, would it take to see the recovery of rankings and traffic? Could we 301 /select-location.php to the root page? Thanks in advance for your insights to this. Any answer is a good answer. Trenton0 -
Different question for differnt purposes
Hi there! I have three questions I have used a wordpress plugin called WPML which translates a webpage into another language so that I have a webpage in two different languages (spanish (main market) and english). I'm just doing the seo for the spanish market and I'm gonna start with the seo for the english one. Should I do it just the same as I had a one-single-language page? just with english keywords, etc. I guessit would only differ in the way I do the linkbuilding strategy as the markets are diffent Should the pages I don't want to optimize with a specific keyword have its own title and description?. I only want them to get indexed by the the bot but not get found by a keyword in particular so that the their content is not very relevant. If my wordpress site "breaks down" and I just have to reinstall the entire site again. What kind of impact has in my SEO? I guess that if the crawler notices that my site is down it will have it into account (negatively) but ....what about the link-juice of my pages, etcc...? What collateral efects has a crash in my site. Thans in advanced.
On-Page Optimization | | juanmiguelcr0 -
Usability-question on 2 of my websites
Hi all, It has been a while since I have been in this forum, but that's normally a great sign 🙂 Anyway these days I'm work on a "face-lift" on a couple of my sites (www.krydsord.dk, www.bingoforum.dk and www.alutagrender.dk), but also this face-lift should be more than just that. Hopefully it will help the usability to be better, and as a result of that - I hope it will make it easier for my visitors to easily find what they are looking for. The question is: I would like to ad, say, 25 words of description (mouse-over) in my top menu buttons. Why? Because, I believe that it's a possible problem that the menu just says "krydsord" (crosswords) in stead of a describing text saying something about "Push this button and you will see a complete list of all the cross words on Krydsord.dk). This way, I get the chance to add more text (for the Search Engines) and to guide my visitors in a way that I'm not capable of with the limitations my top menus give me as they are at this moment. Naturally, my visitors should be able to easily decline this "extra information", once they have got it once. Is this completely way off, or do you like the idea? More specifically: Will this be annoying for the visitors, will it have any positive effect on SEO matters? Actually I got partly inspired during a SEOmoz webinar (http://www.seomoz.org/webinars/designing-for-seo), even though it's not exactly what they are talking about in thwe webinar. For anybody who are curious (or just need to kill some time), you can have a look from 19:00 and watch it for about two minutes. Thanks a lot! Nicolai
On-Page Optimization | | MPO0 -
Internal Linking Question(s)
Is it unwise to link internally to a page more than once on the homepage. I am reading that it is considered spammy. I am also reading that it passes PR twice to the internal page instead of just once... Which is it? Is there a way to stop passing PR to the "contact us" page. I watched an older video that Matt Cutts suggested a nofollow. Now I read that this strategy is a no no? Which is it? Thanks! 🙂
On-Page Optimization | | JML11790 -
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