-
Notifications
You must be signed in to change notification settings - Fork 35
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
request to /collect is cancelled on slow connection #58
Comments
Oh interesting. I mean, this behavior was forked from Plausible's script (the license and copyright is maintained at the top of the file). I didn't think too much about why this was here. I can't rationalize a great reason for why it's there, but I'm sure it was put there for a reason and it's worth trying to figure out why that is. I'd probably poke at other similar scripts to see if anyone else is using that pattern / convince myself it can be removed. |
I noticed the requests were cancelled on a slow network (video below)
The request get's cancelled if /collect doesn't return within a second, which seems a bit low or even unnecessary.
https://github.com/benvinegar/counterscale/blob/main/public/tracker.js#L151
Would you be open to increasing it to something like 5 seconds @benvinegar? It can be easily configured via a data-attribute in the script tag but It's a bit overkill. Or maybe remove that logic altogether?
CleanShot.2024-04-04.at.01.18.42.mp4
The text was updated successfully, but these errors were encountered: