问题
Chrome Version 73.0.3683.75
I noticed recently that whenever I manually set a cookie in Chrome and I either navigate away or refresh the page, then the value I assigned to the cookie is cleared and no longer persists. For some reason, adding a new cookie manually automatically assigns N/A
to its Expires / Max Age
property, which didn't happen before. The cookie value would at least persist during the browser session.
I also see on the application panel that the row in which I add a cookie is highlighted red, but I have no indication as what is causing this. Any help is appreciated.
回答1:
Try filling Expires/ Max-Age field. Worked for me.
来源:https://stackoverflow.com/questions/55246320/prevent-manually-set-cookie-from-clearing-in-chrome-devtools