20.9.10

Internet Explorer breaks setInterval ?

Today i faced a stupid bug in Internet Explorer 8 and javascript.

I had my code in javascript: setInterval(timer, 0.1);
If you are not familiar with setInterval <- click the link :)

This code worked perfectly on any browser except IE 8 and below.
I sat for hours trying to sort it out, and finely found the problem.

IE is too slow to make this loop work... (WTF?)
So i changed it to setInterval(timer, 1); And tested it on few computers..

Only fast PCs could run this code on IE.. but on other browsers it worked perfectly even on slow PCs.

SO.... i changed the line to setInterval(timer, 10); and its finely did the job.

This article was written to tell you DO NOT USE IE.

Friends doesn't let friends use Internet Explorer.

No comments:

Post a Comment