I use firefox as my main browser now for about the last 6 months and have never had a session issue with laravel 5.3 - 5.6. There is a plugin or browser setting (that's not default) or something strange doing this.
Not necessarily. session_use_trans_sid is disabled per default and there really is absolutely no reason to use it anyway. The plain old PHP session (id) is always stored inside cookies, although session cookies and other (third party) cookies may have different security settings in the browser.
If cookies are blocked, your fu**** - unless you use technics like Web Tokens or API Keys, which are passed through HTTP Headers with every single request.
so, is the session not working (no session created at all) or is it just the data that get's not persisted like you expected? cause THAT are really 2 different things.
For each user which visit the web in url /calculation i want generate token like f87ru42946721 and store the token persistence to the moment when user close the browser or remove history and cookies for example ....
I need store the same value of the token through the each request, not only for next ... for each what i want ... something:
user close the browser or remove history and cookies
Then you'd want to use the HTML5 Web Storage API to store the data. If the user deletes cookies, and they delete the session cookie (with the ID to their session), then you will lose all session data for them (and they'll get logged out too). So the only way to store it permanently is in the users browser using local storage.
Of course, they can delete that too in the browser dev tools or via javascript.
@jlrdw Now you are picky. Your session datais worthless without a way to identify the user. How do we identify them? session_id, where is it stored? cookie.
session_id (cookie) + session_data (server) = Session. You can turn it like you want, without cookies it's just not working, unless you have a very specific reason and implementation to work around that. The SID parameter in PHP4 was one of them.
Sometimes you have to look at the whole thing and not just talk about terms. That's just annoying.
Then you have basically just eliminated all of your options, given your requirements.
store the token persistence to the moment when user close the browser or remove history and cookies for example
i dont want depend on javascript
You can only detect when the user closes the browser by javascript via the window.onunload event. If they remove the cookie, you lose your session data in php. Using the HTML5 storage engine uses javascript.
if you are talking about authenticated users, you may also persist the data in the database or wherever you like. Just use the user_id as reference, rather then the session_id. If you save them on every request, you don't really have to check for such things like closing the browser or deleting the session cookies, it's available as long as you store it.