views:

44

answers:

1

I've run into an odd issue. I have a javascript which uses setInterval to keep a session alive. But, it seems that if the browser is left unattended for a period (either leaving it open over night, or out of focus working in another application) the setInterval is not firing in IE and the session is allowed to expire. This does not happen in firefox.

Does anyone know if this is a known issue with setInterval in IE and are there any good solutions?

EDIT (more info on what the setInterval is executing):

setInterval is calling an ajax function which asks the server to update the session timeout.

The interval is set to fire at half the rate of the session timeout (fires every 10 minute, session times out in 20minutes).

A: 

have you tried setTimeout within the same function ? probably is the same thing but worth a shot.

Val