search

Home  >  Q&A  >  body text

javascript - After setting cookie, refresh page disappears

After setting the cookie, there is no cookie information in the Application during browser debugging. After the page is refreshed, the cookie disappears and the program cannot obtain it. I don’t know where the problem is. Is there anything I need to pay attention to when setting the cookie?
The picture below shows the request and return information

The picture below is a screenshot of Application

phpcn_u1582phpcn_u15822752 days ago477

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-05-18 10:58:23

    I found the reason, it was caused by cross-domain, just add the following information

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-18 10:58:23

    是否设置过cookie的生命周期,帖JS代码

    reply
    0
  • Cancelreply