-
Notifications
You must be signed in to change notification settings - Fork 973
Check page status code before running ledger timer #3759
Comments
@bridiver - this looks like a one-liner! care to point me where to add that line (or add the line yourself)? thanks! |
We already cover most of these. Redirects last less than 8 seconds and 5xx errors go to about:error which are already excluded. 304 is a valid and common response that shouldn't be ignored. We can exclude 4xx pages, but it's definitely not a one-liner because we normally don't get the http status code. We either get a load success or load failure, but 4xx pages are not considered load failures by chromium. Electron has a |
Fixes brave#3759 Auditors: @mrose17, @bridiver Test Plan: 1. Visit https://clifton.io 2. Stay on page for a while 3. Confirm time spent is incremented 4. Visit https://clifton.io/404 5. Stay on page for a while 6. Confirm time spent is not incremented Udpated w/ review feedback from @bridiver
Status code should be in the HTTP 2xx Success range. Anything from 3xx (redirects), 4xx (client error), or 5xx (server error) shouldn’t count against the ledger.
Should cover sites out of bandwidth, crashed sites, CloudFlare stuff, dead links, etc.
...and while we're at it, let's ensure that the page is text/html
The text was updated successfully, but these errors were encountered: