How do I delete PHPSESSID on client computers

前端 未结 13 1656
滥情空心
滥情空心 2020-12-30 22:50

UPDATE ON THE PROBLEM:

  • On some browsers, we have two PHPSESSIDs.
  • One PHPSESSID is not set by me anywhere in my script
  • It has
13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 23:29

    You have to remove a cookie on the client side. This is possible with javascript.

    Try this javascript on your site:

    
    

    An example:

    For this example is use the site https://developer.mozilla.org/en-US/.
    If i load this site on the cookies there are the following entries Now I want to remove the cookie with name dwf_section_edit. To delete this cookie I set the expire date to the past. After I execute

    document.cookie = "dwf_section_edit=;Path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";
    

    on the console, the cookie is away as you can see on the following image (i used the little refresh button on bottom left of the table because it is only temporary on this example)

    On the next reload i get the cookie again in this example, because Mozilla give it back to me. On your site you don't have to create the old cookie again, and all is fine.

提交回复
热议问题