dpbyr64224 2013-04-02 11:18
浏览 31

关闭浏览器后,如何在Chrome中访问Cookie

I am facing one issue when I close my chrome browser and it will not show my cookies information in where I print information using $_COOKIE

I set Cookies for 30 days here is the code which is used to set cookies:

setcookie("cookie[".$_product->getSku()."]","".$_product->getSku()."",time()+2592000,'/','new.domain.com',true);

my site is secure so I set true as last parameter

it shows correct cookies information if I am not closing my browser but when O close my browser and come again it will not show the information which I set in cookies.

But when I show cookies information it will show me the cookies which were set earlier.

i also set setting of chrome to unchecked the option so when i close browser it will not delete my cookies too from chrome browser setting.

cookies is working correctly in FireFox eventhough if i close browser, but i can't get an idea what is the issue comes in chrome so if anybody is there which has faced this type of issue then please let me know what i can do to solve this issue

note: i also set expire time of cookies

  • 写回答

1条回答 默认 最新

  • dtj88302 2013-04-02 11:39
    关注

    Odd that it works in Firefox. I assume your Chrome installation is up to date!? Have you tried using setcookie() whist omitting the path and domain parameters to see if that alerts the behaviour in Chrome?

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP