Welcome Guest, Not a member yet? Register   Sign In
Session on ajax
#1

hi , i create a project where a type of user   send data to db only in ajax (dataentry) . How can i manage session with Ajax to redirect if the session expired ? Can i set session that expire  only on browser exit ?
Reply
#2

Check whether a PHP session exists or expired using AJAX
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Thank's for reply.there Is a way tò destroy session only when closing the browser?
Reply
#4

Right, but that is only on the web browser closing.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(11-27-2022, 12:38 AM)InsiteFX Wrote: Right, but that is only on the web browser closing.

How can i do on web browser closing?
Is an intranet web app , i want only have session set .
Reply
#6

You can try playing around with this may get you start on building something that works.

User Login Session Timeout Logout in PHP
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

(11-27-2022, 09:50 AM)InsiteFX Wrote: You can try playing around with this may get you start on building something that works.

User Login Session Timeout Logout in PHP

I have several project that work fine with ci4 , but everyone have normal session  .This project , user side, work only on ajax and i must only destroy session on browser close 


For ci4 and .env file how can i set session to expire on browser closing :

app.sessionExpiration = ?
Reply
#8

(11-27-2022, 10:00 AM)pippuccio76 Wrote: For ci4 and .env file how can i set session to expire on browser closing :

app.sessionExpiration = ?

See https://codeigniter4.github.io/CodeIgnit...references
Reply




Theme © iAndrew 2016 - Forum software by © MyBB