Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FF ajax errors in jquery

13 views
Skip to first unread message

Lev Lvovsky

unread,
Dec 16, 2008, 12:37:36 PM12/16/08
to dev-...@lists.mozilla.org
We're performing a recurring ajax call, wherein we use setTimeout to
recursively call a function an n'th time after the nth-1 invocation of
it has completed.

In using both Firefox (Linux, OSX), and Safari (OSX), performing
certain behaviors in Firefox causes the .ajax error handler to be
called.

So far I've found the following causes this problem:

1. Clicking a link to another page (unload gets called)
2. Pressing ESC repeatedly
3. Clicking on the refresh button (again, unload)

I understand that this might be getting caused by an incomplete ajax
call, and I've several approaches to fix the problem (setting a global
"ignore ajax errors if I've done anything that I know will cause this
problem" flag), however nothing entirely stops this.

We're using jQuery as our JS framework...

Is there a generally accepted way of keeping this from happening?

thanks,
-lev

0 new messages