0
My site creates named sessions for each page to be used in requests and stores unique tokens generated each time the page is accessed and other data.
Example:
$_SESSION['RSD']['page_username_id'] = ...
But if the user, open a new browser tab with this same page, the session is recreated with new data, so it is no longer possible to make requests on the same previous page that is still open, because the page token has been changed, and I don’t want this! I would like the user to be free to access the same page in several tabs if you prefer!
I thought of generating a unique name for each session as soon as the page is loaded, but this would create many, many sessions.
So I’d like to know if creating multiple sessions can really affect the user’s performance, or if there’s another solution where you can have the same result of creating something that provides the single token each time the page is loaded and do not prevent the user to open other tabs of the same page, thus allowing to make requests.
Put yourself in the user position and see if this is good. I particularly don’t like it, because it takes away the user’s freedom. Unless it’s something strict, he can’t open another tab.
– Sam
@Dvdsamm pardon, I think I expressed myself badly, this is happening, and this is exactly what I want to solve, as in the question I thought to add more unique characters at the end of the session name, for this does not happen, but would accumulate many and many sessions until the user closes the browser. I updated the question to see if it makes sense
– user45722