What happens if cookies are disabled?

后端 未结 3 1310
心在旅途
心在旅途 2021-01-11 12:39

Pretty basic question here. In PHP, if the user\'s browser has cookies disabled, you cannot make use of both server cookies ($_SESSION) AND client cookies (

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 13:29

    You can track the user by $_GET.

    Imagine that on every-single-page the user visits you pass a ?user_id=XYZ123 then you would have implemented a very similar server-identification. It has obvious disadvantages:

    1. if you copy/paste a URL you'll give away your session_id
    2. because of 1 session high-jack is even less tech savy

    Why do users disable cookies?
    Users tend to throw first and third party cookies all in the mix but they come from different breeds.

    First party cookies are generally ok. When you visit Facebook it's expected that Facebook keeps a cookie to store your interactions with the server.

    What it's not expected is that the advertising company that has adds both on Facebook and on eBay gets your cookie back and checks, ah, so this guy was on eBay looking for xyz so now that he's on Facebook I'm gonna show him up abc to make him buy etc etc...

提交回复
热议问题