Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cookies are always "Session"
#3
(03-07-2025, 10:50 PM)Alexandre Machado Wrote: As you can see, it is the correct expected result.

But not in the OP'S case.

(03-07-2025, 10:50 PM)Alexandre Machado Wrote: The key here is the Expires field. When Expires = 0 is provided, the cookie is a session cookie. If Expires is less than zero, the cookie will be removed. If Expires is greater than zero, the cookie becomes a persistent cookie

The OP is creating a persistent cookie the same way you are, but it is not persisting.

(03-07-2025, 06:22 AM)Peter Home Wrote: I create three other cookies in the same manner.

However, upon inspection in the browser, all the cookies are created as session cookies. This is true in Firefox, Chrome and various other browsers.

Can you show the actual Set-Cookie header in the responses? Your browser's debugger can provide that to you.

Reply


Messages In This Thread
Cookies are always "Session" - by Peter Home - 03-07-2025, 06:22 AM
RE: Cookies are always "Session" - by rlebeau - 03-08-2025, 11:59 PM
RE: Cookies are always "Session" - by Peter Home - 03-11-2025, 12:44 AM
RE: Cookies are always "Session" - by Peter Home - 03-11-2025, 10:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)