Replies: 1 comment
-
not sure we can do this. According to StackOverflow, they serve different purposes, mainly:
this will likely break things between server-side rendering, or if data is persisted to e.g. localStorage and then restored later. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks! 👋
I understand the reasons for using
Date.now
rather thanperformance.now
for comparing times as it's way faster and has support for more browsers. It's said, I'd like to point out that it also comes with a clear vulnerability: being based on the system clock, any user can skip the cache and, depending on the application characteristics, it can be a real issue to use the library cache implementation.So, I'd like to suggest changing a bit the current implementation by adding the possibility of using the
performance.now
method instead of theDate.now
. Recently I worked on an application where I decided to create an in-house solution rather than using the library one and the reason was just because of theDate.now
use.Of course, I also wanted to hear what you all think about that.
Beta Was this translation helpful? Give feedback.
All reactions