I am trying to learn cookies in js but the name=value pairs aren’t disappearing from console when I set a well past due expiration date. I think it is something to do with the error code with the CSP. Does anybody know how to fix?
the js code:
document.cookie = "firstName=Bob; expires=Sat, 1 2025 23:59:59 EST; path=/";
document.cookie = "lastName=Roberts; expires=Sat, 1 2000 23:59:59 EST; path=/";
console.log(document.cookie);
console line 1: firstName=Bob; lastName=Roberts
1 issue: Content Security Policy of your site blocks the use of ‘eval’ in JavaScript`
I tried changing timezones, dates, and updating VSC.
New contributor
DaoOfBullshit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.