Saner HTML5 History Management
Hashchange
This event is quite simple. Whenever the window.location.hash
property changes, by following a link, setting the property, editing the URL bar, or ...
This event is quite simple. Whenever the window.location.hash
property changes, by following a link, setting the property, editing the URL bar, or ...
One particular weirdness and unpleasantry in JavaScript is the set of equality operators. Like virtually every language, JavaScript has the standard ==
, !=
, <
, >
, <=
, and >=
operators. However, ==
an...
I was talking with a co-worker today about the behavior of setTimeout
and setInterval
when given a small interval, like 0
or 1
. The expectation would be tha...
UPDATE: This technique has turned out to be dangerous in Chrome. It seems that Chrome will load the JS files into the cache, but then set an implied type="text/css" on them. This means that it will refuse to re-use them as Java...
Update: This advice is now totally out-of-date and wrong. Just use replace
. As recent Browserscope results show, all browsers have optimized replace
to be much faster than split
/join
. Thanks to Luigi van der Pal for pointing this out ...