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

39
votes
16answers
1k 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 ...
23
votes
5answers
2k views

Does “putting Javascript at the bottom” defeat the purpose of document.ready?

I know that it is recommended to put Javascript at the bottom of the page, but if I'm using jQuery doesn't this defeat its purpose to run as the DOM is loading? If I have a dropdown menu, for ...
22
votes
5answers
513 views

How can I reduce the costs of loading large JS libraries?

If I am using a large Javascript library for my page, how can I make sure that this does not impair the user's use of the site?
19
votes
1answer
690 views

Someone else is using our Google Analytics Tracking code number. What do we do?

After looking over our Analytics today, I realized that another website is also using our same tracking code #, which is cause quite a few incorrect hits to our Analytics. Are there any ways to ...
18
votes
4answers
393 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 ...
17
votes
4answers
864 views

Why insert static files ( css, images, js, ecc ) in a subdomain?

Why so many big and little sites inserts static files ( css, images, js, ecc ) in a subdomain like media.example.com or s2.static.example.com ? What are the advantages ? Why not just a directory ...
16
votes
6answers
2k 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 ...
15
votes
4answers
7k 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
7answers
1k views

What should I use to automatically combine css/js files?

I'm aware of sprockets for combining javascript files, but haven't tried it. What are some other options and how do they stack up?
14
votes
1answer
43k 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 ...
13
votes
5answers
958 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?
12
votes
4answers
14k 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?
11
votes
5answers
2k 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 ...
11
votes
4answers
891 views

Loading main javascript on every page? Or breaking it up to relevant pages?

I have a 700kb decompressed JS file which is loaded on every page. Before I had 12 javascript files on each page but to reduce http requests I compressed them all into 1 file. This file is ~130kb ...
11
votes
4answers
2k views

Should I combine js/css files into a single file?

Both YSlow and Google's Page Speed add-ons recommend combining script (and style) files into a single file each to reduce the number of HTTP requests, and I can certainly see the point of this when ...

1 2 3 4 5 23
15 30 50 per page