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

fix ajax timing calculation #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Apr 26, 2024

  1. fix ajax timing calculation

    ajax timings are derived from `event.timeStamp` values. latest browser improvements in anti-fingerprinting measures made APIs return timestamps with reduced time precision. calculating timings with those values with `new Date().getTime()` will blow up because it returns a different precision value. the solution is to use `performance.now()` in place of `Date()`
    
    https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp
    https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp
    https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
    
    should resolve peek#33
    should resolve peek#25
    glaszig committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    4c70115 View commit details
    Browse the repository at this point in the history