sid_o Posted August 23, 2009 Share Posted August 23, 2009 Hi, I am redesigning an application from standard PHP to AJAX style & encounter an issue i can't get around it. i will appreciate any ideas & help. The application is closed to registered users only, & i have a setting for session to be live for 1 hour, when it was standard PHP there was no problem, every page load checked the session & acted accordinly, however in ajax i want to have a function the checks if the session timeout & even if no action has been made from the user the page will automaticly redirect itseld to the login page. But i cant seem to get it, will the call to an AJAX function & from there to a PHP file, will that update the session & therefor prevent it from ever expiring? Cheers S. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 23, 2009 Share Posted August 23, 2009 will that update the session & therefor prevent it from ever expiring? Yes, if the page has a session_start() statement. The HTTP request for a page that AJAX makes to the web server is exactly the same as any other HTTP request for a page to the web server. The only thing that AJAX adds is that the response back from the web server is processed by javascript within the current page in the browser. Quote Link to comment Share on other sites More sharing options...
sid_o Posted August 23, 2009 Author Share Posted August 23, 2009 Thanks for the reply, So if the http request updates the session, ten in order to manage a session timeout like system i should use an internal system of some kind? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.