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)

5
votes
3answers
8k views

Possible to only load specifiv 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 facebooks places in an iframe feature from touch.facebook.com I can easily just use ...
1
vote
0answers
188 views

Updating browser window title with Javascript [closed]

Can I target the window title with Javascript and have it update based on certain events?
0
votes
3answers
1k views

Multi column flyout menu [closed]

I want to build a horizontal menu bar with a multi column flyout of the hovered item. It should be done with html lists, css and javascript (if needed) only. There should be a max height of the flyout ...
7
votes
4answers
362 views

Who Is Against CSS and JS?

I know there is a group which promotes very basic HTML. They advocate against CSS and JavaScript. Does anyone know the name of this group? Just to be clear this was a website, or a foundation, or a ...
7
votes
3answers
10k views

Why would you use document.location.protocol instead of plain // prefixed urls?

For instance Google Analytics uses document.location.protocol in the boilerplate for tracking: <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', ...
11
votes
5answers
278 views

Should JavaScript referenced in the head section be served from the same hostname as the main document?

I was under the impression that for the best performance, Javascript should be treated as static content and served from a cookieless domain along with CSS files, images, etc. But Google says here: ...
3
votes
2answers
1k views

Does Internet Explorer 'timeout'?

Within my website I have a single page that dynamically updates via AJAX / JSON in a plain HTML page. Now this page may be left open for up to three or four days. When I left it running over the ...
6
votes
3answers
924 views

Multiple google analytics instances on a page?

My company creates (and hosts) sites for many different clients. We allow clients to send us tracking code, including Google Analytics, and we put them on the page. We would also like to include our ...
3
votes
4answers
815 views

Advantages/disadvantages of “separated” web applications

I'm in the process of designing a (soon-to-be) rather large PHP/MySQL web application. I've come to a fork in the road as far as internal architecture; I can build the website as a "traditional" web ...
7
votes
6answers
449 views

Font resizing widgets: worth it?

I see some text-heavy sites implement the little JavaScript widgets that allow you to choose smaller or larger text sizes on sites. (e.g.: as described on the Guardian's website) Are these little ...
2
votes
1answer
98 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. ...
3
votes
2answers
192 views

What MIME type are you meant to use for JavaScript files?

In the html we always use <script type="text/javascript" charset="utf-8" src="???"></script> (the ECMA stuff confuses some browsers) but on the HTTP side what are you meant to use as the ...
17
votes
6answers
3k 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 ...
3
votes
2answers
595 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
2answers
362 views

AJAX Keyword Suggestion Tool

Are there any JavaScript includes to provide an AJAX based keyword suggestion tool based on some existing text? For instance Yahoo offer a Keyword Extraction Tool but due to cross-domain JavaScript ...
3
votes
4answers
177 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 ...
23
votes
5answers
733 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?
14
votes
7answers
2k 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?
25
votes
4answers
4k 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 ...
11
votes
1answer
163 views

What is the benefit of using Google Analytics' asynchronous tracking code compared to the non-asynchronous code?

What, specifically, does the asynchronous code accomplish or allow that the older code does not?
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 ...
44
votes
16answers
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 ...
8
votes
9answers
432 views

How do I compress my JavaScript and/or CSS?

I know that there are ways to dynamically load it into the page, but if I want to compress my code so it loads even faster, how do I do it?
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? ...
14
votes
5answers
2k 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?
7
votes
2answers
2k views

What are the differences between Firefox's Javascript engine and Chrome's V8?

I've noticed that Chrome and Firefox take different amounts of time to render certain things. In general, Chrome has been faster. What should I know about both of them (and IE8/9, too, I guess) when ...
22
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 ...
5
votes
2answers
89 views

Browser privacy improvement implications for websites

On https://panopticlick.eff.org/ EFF let you test the number of uniquely identifying bits that the browser gives a website. Among these are HTTP header fields such as User-Agent, Accept, ...