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

de-duplicate js code between the two versions #44

Closed
MoralCode opened this issue Feb 4, 2021 · 1 comment
Closed

de-duplicate js code between the two versions #44

MoralCode opened this issue Feb 4, 2021 · 1 comment

Comments

@MoralCode
Copy link
Contributor

It seems to me like the PHP addon is pretty much just serving (nearly) the same javascript and just inserting a more precise time to the millisecond at the end.

Since the client side implementation already reads the time from the HTTP Date header, it might help reduce the duplication of code between the two if the PHP version just set a custom header (like X-Precise-Date, just so you arent messing with the Date header) that contains the date as a string that's parseable by Date() in js if it exists.

@NodeGuy
Copy link
Owner

NodeGuy commented Feb 4, 2021

Let's just kill the PHP code in your PR. We can bring it back in the future if someone asks for greater precision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants