question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Add expires shortcuts?

See original GitHub issue

carhartl/jquery-cookie and js-cookie both provided a shortcut to expiration. If you provided expires: <Number>, then it would assume an expiration of days. Would you be agreeable to this sort of feature in ember-cookies?

We could also enhance this significantly by supporting a String value specifying a duration and units. Maybe use the same characters as date formatting to specify units? ex: '3d' or 50M for 3 days or 50 minutes respectively

Thanks for the addon! Loving it and killing off a jquery plugin and bower dependency!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
geekygrapplercommented, Jul 18, 2017

Hey, @justinaray we have maxAge option, which takes a time in seconds, so I’ve documented that on the Readme. Does that work as an alternative to overloading expires?

0reactions
justinaraycommented, Jul 25, 2017

Thanks @geekygrappler and @marcoow. Max-Age will work for our use case, seems to have pretty good browser support, and MDN says it will be preferred over Expires if both are set and supported.

👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Add expires shortcuts? · Issue #54 - GitHub
If you provided expires: , then it would assume an expiration of days. Would you be agreeable to this sort of feature in...
Read more >
About actions in complicated shortcuts - Apple Support
When you add an Ask for Input action to a shortcut that you plan to run from a ... Enter a time in...
Read more >
[feature request] A filter that expires after a set amount of time. : r ...
r/Enhancement - Moving shortcuts toolbar down? 1.
Read more >
DevTools: Allow to customize keyboard shortcuts/key bindings
With features such as Workspaces landing, I think it would be useful to offer a way to customize keyboard shortcuts for our power...
Read more >
iOS 14 - A Siri, HomeKit, Home App and Shortcuts Overview
This is simply a software feature, which we can enable on our HomePod, Apple TV (HD or 4K), or an iPad. Please note,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found