Questions tagged [javascript]

JavaScript is a dialect of the standardized ECMAScript programming language, primarily used for scripting web-pages. Use this tag for questions regarding ECMAScript and its dialects/ implementations: JavaScript, JScript, etc., excluding ActionScript.

Filter by
Sorted by
Tagged with
22
votes
5answers
5k views

Does the Google spider render JavaScript?

Does the Google spider knows how to render JavaScript, or only HTML?
23
votes
3answers
10k views

Lazy loading images and effects on SEO

We are using the following technique to lazy load images in our site: For all images we put in the src attribute a url for a default img (i.e. a loader) and put the actual image url in the data-src ...
52
votes
17answers
2k views

HTML validation: is it worth it?

What are the advantages and disadvantages (if any) of making sure that all pages validate compared to having non-valid HTML that however works on all major browsers? Also, is having valid HTML after ...
4
votes
2answers
971 views

Will AggregateRating markup that is generated dynamically by client side JavaScript show stars on Google search?

Google show stars in Google search with JavaScript dynamically generated rich snippets? I'm thinking about starting a widget that my users will put in their website. My widget will generate rich ...
30
votes
8answers
27k views

How do you exclude yourself from Google Analytics on your website using cookies?

I'm trying to set up an exclusion filter with a browser cookie, so that my own visits to my don't show up in my Google Analytics. I tried 3 different methods and none of them have worked so far. I ...
14
votes
2answers
7k views

Is this a good approach to image Lazy Loading for SEO?

For images loaded via AJAX, or that I don't want indexed, use the data-* attribute approach: <img data-src="path/to/image.jpg" class="js-lazy-load" /> The javascript maps the data-src ...
6
votes
3answers
1k views

How do I prevent Google from indexing text that is generated by JavaScript?

Google is executing the JavaScript on my password creator website and indexing the random passwords that get generated by the JavaScript. The random text that is generated could look spammy to Google ...
38
votes
4answers
101k views

How do I set expiration headers for CSS, JS, and Images?

I have recently analysed my website with pagespeed addon on firebug. It suggested me to set expiration on CSS, JS and image files. I am wondering how do i do this?
22
votes
6answers
5k views

Can we ignore visitors without JavaScript enabled?

If you have developed a JavaScript based website, is it worth doing the extra work to make it accessible for visitors who don't have JavaScript enabled? What percentage of visitors are in this ...
5
votes
2answers
2k views

Google follows JavaScript string as relative path - produces 404 error

This is my first question on here so I hope I'm not breaking any rules, but I have a problem: I have a site that uses an Adobe Site Catalyst for its online analytics. The suite supports tagging ...
15
votes
5answers
5k views

Should I worry about people disabling Javascript?

Often when picking new tools and frameworks I see the warning "Will not work if the user has disabled Javascript". I then look at my Javascript powered slideshow, Javascript powered menu, and ...
6
votes
4answers
810 views

Will JavaScript (document.write) content be indexed by search engines?

I have an external JS file embedding some content inline in a web page. Basically it just does a document.write("my content") via a script tag and loaded externally with the src attribute. Any ...
5
votes
2answers
177 views

Can I declare a duplicate page via javascript for google?

Most sources of documentation state that one can declare a webpage a duplicate of another by applying this tag on the duplicate page: <link rel="canonical" href="(absolute URL to original page)"&...
5
votes
1answer
891 views

How to overcome politics of the net (Google translate code refuses to work from a specific region)

According to the FAQ's I am not sure if my question is a ok to ask or will be closed or should I post it in the meta or even I would blame some one for downvoting it. However it is one that has been ...
5
votes
2answers
1k views

Is it cheating to serve different versions of the same content to users and crawlers?

I have a "smart" template for my website. For human users, the server renders the page content on the initial hit, but subsequent pages are loaded like an SPA. For a crawler, every page is rendered at ...
3
votes
1answer
368 views

SEO for importing the page header with JavaScript rather than PHP

My website has the same header/sidebar/footer on every page, so I have been importing them using PHP. To do this I forced all html files to be processed through the apache servers PHP handler via ...
3
votes
1answer
392 views

Collapsible menu and amount of links in a web page

One of my pages contain three levels of a collapsible menu (JS + CSS from mycssmenu.com). There are a dozen first level items displayed to users, each one with various second level items, and finally ...
3
votes
2answers
392 views

Does Google count external Javascript or CSS files as backlinks?

Is there any information available on whether search engines (Google) count external Javascript or CSS files as backlinks? Example: Does loading FontAwesome from their CDN count as a backlink for ...
2
votes
1answer
137 views

Can writing a floating navbar's HTML at the bottom of the page increase SEO?

In my entry into SEO (and admittedly the subject is in constant change) I had read SEO Warrior. In that book it explained the concept of increasing a page's SEO value by placing navigation at the ...
1
vote
3answers
847 views

Will my new HTML5 website decrease my Google ranking?

I have a traditional HTML website that loads pages/sections of the site when people click on menu items. Pretty standard. Currently, I'm working on relaunching my website with a brand new HTML5 code &...
78
votes
2answers
541k views

How do I open the JavaScript console in different browsers?

Web browsers provide a JavaScript console as part of their developer tools. This console is useful for the following reasons: Errors and warnings that occur on a web page are logged into the console. ...
16
votes
8answers
7k views

Is inline JavaScript good or bad?

I've currently switched from WordPress to Yii framework and an external developer is rebuilding my site. One thing I notice is that each time he invokes AJAX / jQuery the Yii way, it embeds inserts ...
29
votes
5answers
6k views

Why insert static files (CSS, images, JavaScript, ECC) in a subdomain?

Why so many big and little sites inserts static files (CSS, images, JavaScript, ECC) in a subdomain like media.example.com or s2.static.example.com? What are the advantages? Why not just a directory ...
4
votes
1answer
5k views

Dictionary API for a website?

I would like to have a dictionary for my website where the user can easily fill in a word or better yet right click a word and get the definition right there on the page or something along those lines....
14
votes
5answers
5k views

What's the best way to load Javascript into a page to optimize performance?

Is there a way to load my JavaScript into a page that will make it load faster?
11
votes
2answers
549 views

Google indexing pages with #! although we don't have any

Our company has developed a Single Page Application using AngularJS and its routing. Google indexed our site decently with JavaScript but it did not index some pages very well so we have developed an ...
7
votes
1answer
2k views

For how long does the google bot wait after document ready before taking a snapshot of the webpage?

As the google bot lets the JS do its work on the page while crawling, for how long does it wait to let the javascript execute after document ready ? Suppose I have an AJAX response that takes longer ...
7
votes
3answers
4k views

Would redirecting to a new home page affect SEO?

I'm currently working on a new landing page for this site. I want the landing page to replace the existing front page of the site. However I don't want to lose the Page Rank of the current front page -...
4
votes
2answers
240 views

Is making AJAX site crawlable AND degrading gracefully with JS turned off possible?

According to this spec, making AJAX site crawlable by Googlebot means that you have to use hashbang (#!) links in it which means it won't degrade gracefully when JS is turned off. This might mean that ...
6
votes
3answers
28k views

Possible to only load specific div of a website?

I have this project I'm working on and id like to add a really small list of nearby places using Facebook's places in an iframe feature from touch.facebook.com. I can easily just use touch.facebook....
5
votes
3answers
367 views

Best approach to have Google index content primarily generated by Javascript

I'm developing an app where customers can drop in a Javascript tag onto their website, and it will generate content. What is the best approach to have Google index this content and associate it with ...
4
votes
3answers
5k views

Will using tabs with JavaScript (jQuery) hurt my SEO because of crawlability?

I have a page with tabs like this: http://www.problemio.com/problems/problem.php?problem_id=180 See how there are 3 tabs? Only the content from one of them shows up when the user lands on the page, ...
3
votes
1answer
2k views

Does using onclick on div's effect SEO?

I have a few elements on my page that uses onclick as the link, e.g: <div class="service" onclick="location.href='<?php echo $fields->service_1_link; ?>'" style="cursor:pointer;"> &...
8
votes
1answer
14k views

Is it necessary to specify content-type in http response header?

Except for the html document, currently all the files (css, javascript and images) served from my web server do not specify the content-type in the http response header. I happen to notice this as I ...
5
votes
1answer
3k views

How do I stop Google from indexing AJAX calls within Javascript?

We are getting a number of odd results come up on Google EG: http://www.somedomain.com/somepage/AjaxFunction.aspx?stuff=XXX&other=XXX When I looked at "somepage" the ajax function is not ...
4
votes
1answer
636 views

Does Googlebot trigger onclick events and index the resulting content?

I've found many topics about Googlebot following links and executing ajax queries but none that tell me whether onclick events would get triggered and results crawled. Let's say that an image is ...
4
votes
1answer
1k views

How to inform Crawler on AngularJS permanently moved page without losing SEO ranking

I am using Angular JS app and serving snapshots for crawlers when they visit. Changes are inevitable and hence certain pages are to be moved permanently (Redirect 301). For example: www.domain.com/#!...
4
votes
2answers
421 views

How can I get Google to index content that is written into the page with JavaScript?

I have a website that focuses on charts and graphs. The graphs on the site are drawn using JavaScript, but contain keywords that I would like to have indexed. For example, here is a screenshot of ...
3
votes
1answer
2k views

Can I reposition AdSense ads with Javascript (for responsive purposes)?

I have a responsive blog where ads are displayed in the sidebar. On mobile devices however, the sidebar is pushed to the bottom below the posts. So what I'd like to do is move the ads from the ...
3
votes
2answers
760 views

Google JSAPI Auto-Loading

When using Google's JSAPI Auto-Loading system - is there a way to get the returned file with all the JavaScript (combined) in one HTTP request? At the minute is just calls the load routines (with ...
3
votes
1answer
113 views

Can I randomly change the page title for users while showing search engines a static title?

Let's say I wanted to make a website or series of pages where the title (or at least what appears on your browser's tab) alternates randomly each time it's loaded - just for giggles. I have a bank of ...
3
votes
2answers
759 views

How can I create links in javascript that are crawlable by search engines?

If I use JavaScript + jQuery, for example, does links inserted in $(document).ready() will be available for crawling? How can I insert crawlable links in JavaScript?
2
votes
2answers
456 views

Is it possible for a script tag to be perceived as an inbound link for SEO?

My company has <script> tags on a lot of sites, some of these sites have very high page ranks. Right now the <script> tags have a src of Microsoft's blob data. We want to move away from ...
2
votes
1answer
222 views

Google SDTT does not fetch structured data by URL

I initially wrote some code that created the structured data for breadcrumb and product markup on the server's side and rendered them in the <body> of the page. While the mark up was correct ...
2
votes
1answer
2k views

Does Google perform onClick actions?

Can somebody approve to see, that Google (googlebot / crawler) performs onClick (or similar js) actions? It is fact, that Google performs POST - i'm interesting, whether somebody has realized any js ...
2
votes
0answers
2k views

How do I use the ga() function in Google Analytics when the tag is in Google Tag Manager: Uncaught ReferenceError: ga is not defined

I'm following this: But in my real code, I've used google tag manager to manage google analytics. So I have just one script in the head of my website which belongs to gtm: (function(w,d,s,l,i){w[l]=...
1
vote
1answer
97 views

Why is hidden content not always indexed?

I've read several blogs discussing the 'hidden content' issue. This article experimented with several options. It concludes that Google DOES index hidden content. The issues is also discussed here. ...
1
vote
2answers
421 views

Litmus test to determine if javascript content is crawlable

Already read this: How can I create links in javascript that are crawlable by search engines? I make the assumption that if you view source on a page and can find content / links hidden by javascript ...
0
votes
2answers
809 views

How to find a good photo gallery for my website? [duplicate]

Possible Duplicate: Which Content Management System (CMS) should I use? For my website I'm searching for a really simple gallery module that looks like the one use by Dropbox. But I'd like to ...
0
votes
1answer
2k views

SEO - Index images (lazyload)

Note:My question is not about Javascript. I'm developing a plugin for jQuery/Mootols/Prototype, that work with DOM. This plugin will be to improve page performance (better user experience). The ...