Closing the browser requires users to log in again

I read somewhere that 24 hours is the default for a session
but my users claim that when closing the browser and opening it again they must login again. why does the session is closed when closing the browser?

what can i do ? it’s a very bad UX.

as admin it doesn’t happening to me, but i did tests in other computers and saw the issue myself.

Maybe they have selected options in their Web browser to clear cookies, cache, session, etc. on exit.
Or, they are using a Private Window.

I cannot confirm that, but let’s view it from another perspective.
As the owner of the server which hosts an app your users are using, you could limit the session (PHP session, SSL session, etc.) up to as much as I want, let’s say for example 15 minutes and then logout everyone who’s session passed 15 minutes - while the user hasn’t closed it’s web browser - simple as it, right?

Hm, depending on the user location, for example, logging into a Webmail in a caffe and leaving it, but not closing the Web browser - leaving it open as is, without a session timeout/lifetime so anyone else could read his/her e-mail just like that? - that really wouldn’t be good.

What are they logging into?

@fritex - they are using chrome regular window (not private) - any advise why this could happen and how can i fix it ?
@sdayman - login into my wordpress site.

thanks u both for trying helping me

please?? anybody? :frowning: @sdayman ? @fritex ?

I truly do not know what to suggest to you so you could pass that to your users.

By default, WordPress makes your login session cookie expire in 48 hours (or on browser close), or 14 days if you check the “Remember Me” box.

WordPress Session cookies are stored temporarily in memory and are automatically removed when the browser closes or the session ends

Source: WordPress Cookies and PHP Sessions - Everything You Need to Know

Regarding WordPress cookies and session, maybye you can try out increasing the timeout, if so. Maybe you have to check the “Remember me” checkbox option?

Therefore, try this:

I got logged out from every Website when I close my Firefox, as I setup it like that either to clear cookies, cache and data - as I do not see any reason why should I keep that on my compuer and pile up my disk space keeping old data/files.

These are the thesis and answers.Try out some solution from above and finding more information about WordPress cookies and sessions.

Furthermore, I am afraid this “issue” is not anymore related to Cloudflare. Maybe it is not actually an issue itself, rather a default Web browser behaviour.

Some users experience the phenomenon and some - who live on another continent - do not. (they use same browsers . but do not logged out when close the browser) So I thought it was a matter of location and somehow related to clouflaire.
i will try the guides thanks a lot!

huge thanks!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.