Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get expiry date #281

Closed
Soolan opened this issue Oct 22, 2023 · 4 comments
Closed

Get expiry date #281

Soolan opened this issue Oct 22, 2023 · 4 comments
Assignees

Comments

@Soolan
Copy link

Soolan commented Oct 22, 2023

Is your feature request related to a problem? Please describe

Using:
set( name: string, value: string, options?: { expires?: number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'None' | 'Strict'}): void;

you can set the expiry date for a cookie.

But I can't find any function to read the expiry date associated with a cookie.

Describe the solution you'd like

na

Describe alternatives you've considered

na

Additional context

No response

@github-actions
Copy link

Hello 👋 @Soolan
Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible.
Feel free to raise a PR if you can fix the issue

@pavankjadda
Copy link
Collaborator

@Soolan What would be usecase for this?

@Soolan
Copy link
Author

Soolan commented Oct 26, 2023

@pavankjadda a few days ago I was facing a challenge where I was asked to refresh a cookie expiry time based on another timestamp variable.

Turned out that other timestamp object would be redundant IF we would be able to read the expiry time from the cookie itself.
Just a thought.

@pavankjadda
Copy link
Collaborator

@Soolan Unfortunately the browser do not expose cookie expiration date. They only return cookie value.

@pavankjadda pavankjadda closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants