File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes jQuery , session timeout and cache issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery , session timeout and cache issues" Watch "jQuery , session timeout and cache issues" New topic

jQuery , session timeout and cache issues

Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
Hello Everybody

I am using jquery ajax to fetch some data from the server . But then i experience some strange unexpected behavior

I have my session timeout set @ 5 minutes . So if a user tries to refresh the page or click on the existing link to fetch the data from the server then the app should be redirected to the login page (implementation specific)

What is happening now is very strange , browser is caching the call , data and returning back the data ever after the session is timed out . So i thought entry in ajax call might solve the issue , but then it doesnt help me as well

Even though the timestamp is appended to the url when cache is set to false , why is the call not reaching the server

How do i make sure that any ajax call hits the server after the session is timed out

Any inputs would be helpful

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Which browser(s) does this happen in?

GenRocket - Experts at Building Test Data
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

If the URL is unique every time, it cannot be a caching issue.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: jQuery , session timeout and cache issues
It's not a secret anymore!