Classic ASP: Multiple ASPSESSIONID in cookies

后端 未结 7 1067
悲&欢浪女
悲&欢浪女 2020-12-01 21:07

I have a problem with a classic asp page and I just cannot solve it since 3 days.

The page is working with Sessions - sometimes it happens that the ASPSESSIONID cook

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 21:42

    This issue also troubled me for a long time. And I cannot solve it.

    It's none of browsers business. My Chrome, Firefox, IE all have this issue.

    Sometimes I can see 20+ ASPSESSIONIDXXXX cookies in one page.

    Finally I must use javascript to clear the old ASPSESSIONID*** and keep the latest one.

    function clearASPSESSIONID(){
        var cks = document.cookie.match(/\b(ASPSESSIONID[A-Z]+)(?==)/g),
            lskey = 'oldASPSESSIONID-'+location.protocol+'//'+location.host,
            old = window.localStorage ? localStorage.getItem(lskey) : '',
            keep, i;
        for(i=0;i

提交回复
热议问题