Home > Back-end >  Session variables and Samsung Internet
Session variables and Samsung Internet

Time:12-20

I save authentication information in PHP Session variables. Works as it should anywhere - except on Samsung Internet on my Galaxy S8.

Found out that var_dump($_SESSION); is completely empty at subsequent calls, both Jquery ajax and javascript fetch. But only on my phone: works as it should on a Galaxy Note 8.

Edit 1:
echo "<script>alert('session_id: ".session_id()."') ; </script>"; Added this at both the main page and the called page. On my s8 they were different.

Edit 2:
It was probably a bug in Samsung Internet 8 (8.2.01.2). Upgraded to latest and the issue is gone. Note that fetch is supported since 4.0

CodePudding user response:

Do you have cookie support enabled or are they turned off in Samsung Internet Browser?

If they are turned off. you could always use URL session ids... learn more here

Also, check out this reply to a related question. There are some security concerns with using Session Ids in URLs, but they are supported out of the box by PHP.


Another option, would be to employ some Javascript to check for a cookie, from your server... and if not found, notify the user that your site requires the use of cookies, to function properly


That is, if it's a cookie issue.

CodePudding user response:

It was probably a bug in Samsung Internet 8 (8.2.01.2). Upgraded to latest and the issue is gone. Note that fetch is supported since 4.0.

  • Related