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)

27
votes
1answer
133k views

How to open the JavaScript console in different browsers?

Updated on October 7th 2012 Chrome: Press either CTRL + SHIFT + J to open the "Console" tab of the Developer Tools. Alternative method: Press either CTRL + SHIFT + I or F12 to open the ...
0
votes
1answer
242 views

Segment subdomains with Google Analytics?

So, when a website has multiple subdomains: www.example.com foo.example.com bar.example.com What is the best way to use Google Analytics to segment the data? I would prefer have access to 'All ...
3
votes
2answers
173 views

Track exit link and ads with PHP

I want to track exit links on my website and also exit ads like Google Adsense etc. I mean by exit ads is that when click on add I get ads dimension and ads type like Google or other ads. In short I ...
2
votes
1answer
130 views

JavaScript loaded external content SEO

I wonder what is the best way to have Javascript loaded content indexed by search engines. I know that search engines don't execute Javascript, but I am thinking more of an progressive enchantment. I ...
1
vote
3answers
191 views

cookie not being sent when requesting JS

I host a webservice, and provide my members with a Javascript bookmarklet, which loads a JS sript from my server. However, clients must be logged in, in order to receive the JS script. This works for ...
1
vote
1answer
737 views

Decoding an encrypted HTML file using Javascript

I am trying to decrypt the encrypted page source of an HTML file. I am searching for a decoding trick to decrypt a page containing Facebook interface UI. It is in the following post decrypted facebook ...
1
vote
1answer
418 views

how to retrieve img alt text with jquery or javascript? [closed]

Which is the code with which we can retreive alternative text of image: It is a Cataloge with clothes. Dressers, Shirts, Skirts e.t.c. in front page of a site. The featured images of the categories ...
0
votes
2answers
194 views

Google Analytics and Whos.amung.us in realtime visitors, why such an enormous discrepancy?

Since years I use in a site both Google Analytics and Whos.amung.us, both Google analytics and whos.amung.us javascripts are inserted in the same pages in the tracked part of the site. In real-time ...
1
vote
3answers
112 views

AdSense block not displaying anything

I have copied and pasted the following code into my page, but it seems to be having no effect. It should have a fall back block colour, but nothing is showing. Code copied/pasted straight from ...
0
votes
1answer
58 views

Will Google treat this JavaScript code as a bad practice?

I have a website that provides a custom UX experience implemented via JavaScript. When JavaScript is disabled in the browser the website falls back to CSS for the layout. To make this possible I've ...
2
votes
1answer
425 views

SimpleViewer + lightbox

Is it possible to integrate any kind of Lightbox with SimpleViewer? But I don't want to display SimpleViewer in Lightbox. I want to Lightbox show when I click on one of the images in SimpleViewer. ...
4
votes
2answers
67 views

Abandoment to blame for the last JavaScript file not always being loaded?

I have a code snippet for an app that users are loading as a 3rd party script on their site. The general sequence is as follows: Site loads http://www.example.com/foo.js foo.js does stuff 1 to 2 ...
1
vote
1answer
261 views

GA and /outbound/javascript:void(0) bounce rate

My Google Analytics reports a bounce rate very high for outbound/javascript:void(0) but I don't understand what this URL is. I use Drupal, and in the HTML code there isn't this URL.
1
vote
1answer
136 views

sku code as description in Google Analytics

In the Google Analytics ecommerce tracing script you must provide for every item and SKU code. I have this code for every product I'm selling and up until now I have always provided it in the _addItem ...
1
vote
1answer
92 views

Using Google Tag Manager to define the page type

So, I am looking to add a tag that I want to use for A/B testing, however we don't have a page-type URL structure. Fortunately the tool can recognise page type if I pass it by Javascript. <script ...
0
votes
1answer
65 views

Suddenly my server reject all POST requests

Just go to http://meet-romance.com/test.htm. The script there is simple, it's a form with a button: <form action="test.htm" method="post"> <input name="Button1" type="submit" value="button" ...
1
vote
1answer
1k views

Monitoring JSON requests sent/received from the browser?

Having a website that generates and receives JSON requests via AJAX, I failed to find a tool that shows me live the communication including the content of the JSON calls. I thought that the Google ...
0
votes
1answer
232 views

A POST request on a page with HTTPS is done automatically in HTTPS?

If I make a request to page.php (AJAX) with JavaScript from a HTTPS page, the request is automatically made ​​page.php directly with HTTPS or HTTP? If HTTP, how to send a request (to the same domain) ...
4
votes
3answers
185 views

Is there an elegant way to track multiple domains under separate accounts with Google Analytics?

I have a situation where a content management system uses the same template for multiple websites with different domain names and I can't make a separate template for each. However, each website needs ...
7
votes
9answers
1k views

prototype.js or jQuery for new projects?

Should I use prototype.js or jQuery for a new project? Rails comes with prototype.js but jQuery seems the library of choice for the rest of the world. Is prototype.js still under active development? ...
0
votes
1answer
514 views

What does it mean to infect people with silent java drive?

I've got a weird contact message through my website, claiming they have found a security vulnerability and wonder if I have a bug bounty program. The details they shared: Only what I can say is ...
2
votes
2answers
277 views

jQuery scrolling images for e-commerce site, what to do about users who disable JS

As the title suggests, I am developing an e-commerce site and I intend of having two jQuery plug ins on the default page, one for scrolling images and the other for the navigation menu. Should I be ...
2
votes
1answer
91 views

@Viewport @media use for input type?

I've searched high and low for some way to setup my HTML5/CSS3 for various devices. Going by screen resolution isn't the best route because some times the screen size of one device is the same as ...
-1
votes
1answer
123 views

How to display a logo in a printed web page that doesn't appear on-screen? [closed]

I have sales report I want to print with a logo, but I don't want it shown on the screen. I'm currently trying to use JavaScript to print a particular DIV from a page: <script ...
3
votes
2answers
4k views

Free/cheap Whois Api [closed]

Is there a free API where I can pull whois data and server location data? (similar to who.is)
2
votes
1answer
127 views

Schema.org's WebApplication: for web applications or references to web application?

Assuming one offers an online service on a page using HTML5 + Javavascript. Technically speaking, it can be considered as a web application. Is the WebApplication itemtype appropriate for this page ...
0
votes
1answer
88 views

Is it safe to manipulate with DOM (using JavaScript) to move up in the search results?

I have some text written for SEO purposes and it is located right after the opening body tag, so it is at the top of the page. That doesn't look great so this text is moved to the bottom of the page ...
2
votes
2answers
50 views

May site A or B get banned/penalized if from site A I use window.open to site B?

As many advertising systems open popups, I was wondering what if from my site A I make (randomly, I mean not every time) a window.open(B)? Could one of the sites get banned?
2
votes
1answer
248 views

Can minification in Google PageSped service break Adsense?

A few days ago I applied for Adsense account. But it was rejected due website being down. Here is the full message: We did not approve your application for the reasons listed below. Issues: ...
0
votes
1answer
169 views

Strange: Google indexing onload generated content?

I've noticed in Google's results page that my website's listing details (i.e. bellow the link) displays content that is only generated during the page onload function. This surprised me as I thought ...
1
vote
2answers
981 views

Comparisons of Javascript 'data grids'? [closed]

I've found plenty of questions between here and StackExchange of people asking for the 'best' data grid / data table, or one that has a particular feature, and plenty of lists out there (of various ...
0
votes
3answers
458 views

Tracking Outgoing Links With Google Analytics Events

I've been trying to track clicks on external links on my website using the events tracking method. So I've got my Google Analytics code setup before body ends as shown below (note: quotes have been ...
0
votes
2answers
166 views

Best way for beginner to learn JavaScript and PHP coding [closed]

I have a job interview coming up and in job description it states I need to be able to write JavaScript and PHP coding. Now its been a while since I did JavaScript and PHP coding. I am planning to use ...
4
votes
5answers
944 views

JavaScript to stream video files

Is there a JavaScript API for streaming WMV/AVI/MOV files?
1
vote
1answer
140 views

Multimedia web applications that perform well [closed]

There are a few multimedia web applications like PHPMotion, ClipBucket that allow playback of multimedia files. Beside the mentioned multimedia web applications, are there other similar multimedia ...
0
votes
1answer
21 views

Indexing a page in which the content is discovered in a map

We want to improve our site's SEO. The page is a GWT (javascript based) web page and its content is discovered through a map or a GPS. Now we have just a normal landing html page, and the map and ...
1
vote
1answer
117 views

How to Trigger GA Event for Every Single Pageview (of a certain type)

Thanks, edited my question. I need a reliable way to capture a GA event whenever the GA tracking code fires for a particular page only. Doing so because we want to assign a dollar value to simply ...
2
votes
1answer
308 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 ...
1
vote
1answer
51 views

Redundant Parameters in Google Analytics JS Snippet

Google Analytics provide this snippet of code to copy and paste to a site: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ ...
3
votes
2answers
934 views

How to disallow selection of text on website?

I have a question about preventing the selection of content and right-clicking with your mouse on a website. Some websites that I have encountered display a dialog which prohibits right-clicking but ...
1
vote
2answers
512 views

Is there any way to get data from Google Analytics Per Page Visit

I am using Google Analytics to track visitors of my website. I also want to track IP address of the visitor but Google doesn't allow this. Now I am thinking that I must save IP address of the visitor ...
0
votes
1answer
191 views

Bounce rate nearly 100% in Safari AND Firefox? [closed]

Our website has a bounce rate of nearly 100% in both Firefox and Safari, and around ~40% in all other browsers. The bounces span all versions of each browser and both operating systems. I cannot ...
15
votes
4answers
31k 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?
0
votes
1answer
50 views

Is it possible to have Google index one page with one URL and have it link to another URL?

We want to tell Google to crawl a content heavy page but list a link to a much more performant JavaScript version of the page. Is this possible? I.e. Give Google a sitemap, then put canonical tags ...
0
votes
1answer
64 views

What is the impact on SEO for having a div that is removed by JavaScript

What, if any, impact would there be for having a stripped down view of my content in a <div> that is quickly replaced by [a much richer view] via JavaScript? Would this be any different than ...
1
vote
2answers
1k views

How can I make Twitter, Facebook and Reddit share buttons load last?

I have a website with a number of pages that sport Twitter, Facebook and Reddit share buttons. They take forever to load and until they do the rest of the page doesn't load. So how I can make them ...
18
votes
5answers
460 views

What documentation exists for HTML, CSS, and JavaScript?

PHP users have the PHP.net docs Ruby users have Ruby-Doc.org Python users have docs.python.org jQuery users have docs.jquery.com All are considered go-to references when working within those ...
0
votes
2answers
1k views

What is the syntax for putting a nofollow attribute into a javascript file

Matt Cutts states in this video: It turns out that as we are executing JavaScript, we do look at the attributes. So you can actually use Javascript and put, like, a nofollow attribute on ...
8
votes
8answers
5k views

Why not AJAX'ify entire websites?

Is there any solid reasoning as to why sites shouldn't be developed with ajax functionality that loads major parts of each part (assuming there are elements like the header, navigation etc that remain ...
21
votes
4answers
2k 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 ...