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.

learn more… | top users | synonyms (2)

3
votes
1answer
2k views

Cufon text replacement and IE8 standards mode

I have a perculiar issue. In IE8 standards mode text replaced by Cufon.Replace works roughly 50% of the time, the rest of the time the DOM modifications are there (viewed through IE developer toolbar ...
3
votes
1answer
15 views

How to tell if an incoming connection is a cellular network or not

I've got a page that will be loading a bunch of fairly high resolution images, as well as a full HD video. Is there a way to detect if someone is using cellular on their phone vs wifi, so I can use a ...
3
votes
1answer
58 views

restricting Google Maps js API keys to just my domain

My site uses the Google Maps javascript API, so I'm using a "Browser key", which is plainly visible in my javascript to anyone who does "View Source". Google's documentation on Browser keys in ...
3
votes
1answer
56 views

Structured Data Tool doesn't see JavaScript rendered content

Some structured data (namely price) of my page is rendered by JavaScript. According to fetching results in Webmaster tools Googlebot sees and renders it perfectly. However the structured data tool ...
3
votes
2answers
251 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 ...
3
votes
1answer
60 views

What are the effects on loading times when conditionally loading and concatenating scripts?

Suppose you have a script in your theme that you always need on every page - say 'animate-menu.js' (10KB) - and you have one that you only need on one specific page - say 'validate-contactform.js' (...
3
votes
2answers
1k views

Test different timezones

What is a simple way to temporarily change the timezone in Chrome so as to test how a site renders for different locations? On OSX Mountain Lion, I've tried as bash script with: export TZ='Indian/...
3
votes
1answer
378 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
724 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
0answers
45 views

Blocking the ISP's ads appearing after a possible DNS grab and redirect via port 53? [closed]

Whenever I switch on my modem and try to connect to the internet, my ISP redirects me to their website. I'm assuming they are grabbing DNS requests and redirecting them using port 53. A video of it ...
3
votes
1answer
2k views

Forbidden 403 error on Google AdSense requests

I have created a new website and have set some ads. For some unknown reason, FireBug tells me that I get 403 errors on Google Adsense requests. I have checked my AdSense account and it does not block ...
3
votes
4answers
197 views

Are there any scripts to integrate social networking site's chat and posting features into a webpage [closed]

Are there any scripts to integrate social networking site's chat and posting features into a webpage using PHP or JS... for example a section with Facebook chat, a section to post to twitter and maybe ...
2
votes
4answers
111 views

Should I rely on externally-hosted services?

I am wondering over the dangers / difficulties in using external services like Google Chart in my production state website. With external services I mean them that you can't download and host on your ...
2
votes
1answer
133 views

Why don't people embed style and scripts in the HTML?

I know this sounds like a silly question, but hear me out. These days, there are a lot of 'media aggregator' tools that will take your globs of javascript (laden with coffee and underscores and ...
2
votes
3answers
533 views

rel=nofollow, JavaScript slider content, SEO

My website has all content on one page. I'm using JavaScript to slide (animate) between the various "subpages", so only the subpage content is shown. The menu buttons are as this: <a href="#...
2
votes
2answers
1k views

How to get browsers to only download CSS/Javascript when it changes?

I had an epiphany earlier when reading codinghorror. On a content website (blog/forum/website) the basic things rarely change if at all. So I was wondering if there was a way to cache them and only re-...
2
votes
3answers
370 views

what's a good jquery-based content slider?

I've searched around there's so many but none seems to fit the requirements. so here is what i'm looking for: - needs to be lightweight (10+kb of JS just to slide images around is an overkill in my ...
2
votes
3answers
616 views

Site failing randomly - could it be Cloudflare or something weird in the JS?

I've been working on a simple site that uses javascript to fade through some fullscreen background images as well as some other simple animations. I've tested the site on Chrome, Safari, FF and Opera ...
2
votes
1answer
115 views

Prevent HTML files downloaded from getting copied from that particular system to another system or getting the script modified?

How to prevent my HTML files downloaded to a particular system from getting copied from that particular system to another system or getting the script modified? Is there any tool or method out? Well, ...
2
votes
2answers
4k views

Is there a Lightbox style plugin that fits images to screen size?

I'm looking for a Lightbox type js plugin that would take into account the browser window size and resize the currently displayed photo so it fits - like the jquery-imagefit plugin does.
2
votes
1answer
167 views

Does e.preventDefault on link prevent the page from being crawled?

I have a couple of links in navigation on homepage that lead to new pages. When clicked on link, i want to prevent going on that page (e.preventDefault()), and instead load that page in popup with ...
2
votes
2answers
660 views

Is changing HTML with JavaScript bad for SEO?

Building web apps I don't have to worry so much about SEO for back end things so dynamically changing the HTML isn't an issue. I am using backbone.js with a front end site I'm building and the site ...
2
votes
2answers
70 views

How does this stackexchange form saved the work, I mean keep an auto save function, to retrieve loss of work

How does this stackexchange form saved the work, I mean keep an auto save function, to retrieve loss of work, in case the user's browser crashes.
2
votes
4answers
6k views

Website or service to view a page without Javascript [closed]

Is there any website or service that allows you to submit a URL and displays the corresponding page with Javascript stripped out/disabled? Clarification: This is to send a link to someone else to ...
2
votes
1answer
96 views

Duplication of menu through javascript or PHP: Which is better for SEO and page performance?

I have a site with a typical desktop dropdown menu. For the mobile menu (and on touch devices), I am using javascript to slide it out onto the page from the right side by touching a menu button. The ...
2
votes
2answers
779 views

Does Bing execute Javascript when crawling and indexing web pages (like Google)?

Some content on some web pages is only displayed with Javascript when a button is clicked (for example). We know that Google executes Javascript and is (very likely) to find this content, but what ...
2
votes
1answer
71 views

Suspicious script loads ONLY when navigating to site via search engines

I cannot find anywhere on our site where this code is referenced. More importantly it does not appear when navigating directly to our URL, it only appears when coming from a search engine (including ...
2
votes
3answers
305 views

How do I enable compression to reduce the file transfer size on GoDaddy?

I have hosted one of my website on godaddy.com. How do I enable compression to reduce the file transfer size? I need to compress the .css and .js files. I tried the following but it doesn't work : ...
2
votes
2answers
131 views

Do web crawlers have local storage?

The title basically says it all, but the reason for my question is this... I make a few checks before I load in any ads, and one of these checks is to see if the browser has local storage as my "...
2
votes
3answers
424 views

Is doing A/B tests using site redirection a bad practice?

I'm developing hotels websites here in Brazil. When the site is done, we do an A/B test with the old version to measure conversion and show to the hotel owner how good our site is. Due to the fact ...
2
votes
2answers
353 views

How to do a JavaScript redirection to the same page without hurting my SEO?

I did something that does that when people land on my page for the first time, they get a JavaScript redirection to the same page, but with PHP $_GET URL queries, then this page redirect back to the ...
2
votes
1answer
70 views

Is it acceptable practice to change the behavior of old HTML tags?

In my app I need to display some maps. So I use Leaflet.js to do so, but to simplify my HTML I have used a <map> tag to do so. Is that acceptable, or should I avoid doing this?
2
votes
2answers
209 views

Get google to index JavaScript pages as separate pages

I have a product page with say 10 products, that loads up all the content when the page loads. Then JavaScript hides content till a product is selected. Then JavaScript hides and unhides information. ...
2
votes
1answer
1k views

How can I block site visitors using legacy browsers

I want my site to block access to visitors that are using outdated browsers such as IE6 and IE7 etc. I am looking for a script that I can use to block certain browsers accessing my site
2
votes
1answer
1k views

Why am I getting messages from cloudfront in my error log?

I frequently have messages like this in my websites error log: "Script error.". URL: https://e3m4drct5m1ays.cloudfront.net/items/loaders /loader_21.js?pid=21&systemid=...
2
votes
3answers
438 views

What parts of JavaScript and jQuery are essential reading for Web Designers [closed]

As a web designer, how should I go about learning javascript and jquery? I would like to avoid duplicating my efforts and focus on whats important. I am very much confused and need a place to start.
2
votes
1answer
353 views

Making JSON page which renders on document ready indexable

I have a page which is pretty much 99% on document ready generated by various JS files. It then gets and renders tons of JSON (I use tempo JS for rendering). It all happens on document ready. So ...
2
votes
2answers
184 views

Google and random redirects

I have a site where homepage "example.com" redirects to random joke(example.com/random-joke). First I redirected with php, but then google indexed that joke page(rather to be empty). I used "302 Found"...
2
votes
2answers
840 views

Prezi HTML 5 & html5 book recommendation

I was wondering what were you thought on being able to build an app similar to prezi (presentation app) using HTML 5. Also while you're at it, I'm looking for a good HTML 5 book recommendation. ...
2
votes
1answer
2k views

Rounded corners in IE7 and IE8

Now every major browser supports border-radius, I was wondering what the best way to get rounded corners in IE7 and IE8 is until IE9+ becomes most dominant version of IE. I've seen several javascript ...
2
votes
2answers
144 views

Disqus analogs? (comments platforms) [closed]

What analogs of Disqus for comments do you know?
2
votes
3answers
154 views

Recommend me a CSS/JS compressor

There are scripts to compress CSS on-demand like these. Have you stumbled upon something similar for javascripts? Also, any recommendations regarding CSS and JS compression are more than welcome. ...
2
votes
1answer
100 views

Guidelines for Opera Mobile

Opera Mobile fails to render two sites I help out with correctly and I cannot find the guidelines for Opera Mobile. All other browsers tested (even Opera for the Wii) show these sites correctly. ...
2
votes
1answer
24 views

Is it possible to change from domains to phrases in the URL bar?

You can change a URL like google.com to google.com/test without reloading the page by JavaScript. Is it possible to completely change the URL like from google.com to Welcom.To.The.Website using the ...
2
votes
1answer
19 views

Can it be an issue to search engines if a primary image in a webpage is not declared with an image tag?

I was looking at my reports on google adsense, and on my mobile site, google reports that people see ads about 1% of the time. The stats are much more in my favor on the desktop site where the ads are ...
2
votes
1answer
421 views

Will Google/Bing crawl my website both with and without Javascript, or with only?

We have put a lot of work into our website, to try and make it as SEO-friendly as possible, while also providing a great UX. If you visit with JavaScript enabled, you get a slick AngularJS SPA, which ...
2
votes
1answer
69 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 ...
2
votes
1answer
248 views

Will asynchronous JavaScript affect SEO?

As page load time affects SEO ranking. In my site I am having some asynchronous JavaScript like AddThis, Google Translator which makes my page load time longer. I want to know whether is there any ...
2
votes
1answer
731 views

Could too many HTTP requests using AJAX result in browser crashes?

We are running an ASP.NET web application, and recently we received a lot of crash reports from users. It sometimes crashes the Chrome browser, and sometimes it loads indefinitely. This is how our ...
2
votes
1answer
4k views

Internet Explorer iframe JavaScript access denied

I have a webpage on domain www.example.com that has an <iframe> with a page test.html from sub.example2.com. test.html includes a JavaScript from another domain: <script src="//ajax....