Page 1 of 1

[question] regarding userclick parameters

PostPosted: Sun Jul 03, 2022 8:07 pm
by Sweeze
heya! i know that as things are it's encouraged for scripts that perform restricted actions (and thus operate off of human input) to include a user timestamp for the user input that triggered the request to ns. the example linked, however, includes said timestamp as a URL parameter, but i know that's also what has to be done for browser extensions in substitute of including the useragent in a header. however, since i'm using the requests module with python, i can send whatever parameters and headers i want, so to my main question:
would it be preferred for a userclick timestamp to be included as a header or a url parameter?

PostPosted: Sun Jul 03, 2022 11:29 pm
by Esfalsa
With client-side JavaScript, User-Agent must be sent as a URL parameter because Chrome will silently drop it if included as a header. But if memory servers, no such limitations should affect a custom userclick header. Just wanted to piggyback off of Sweeze's question briefly and ask if the answer would be the same regardless of the language/platform used or if it would differ (e.g. for Python vs JavaScript).

PostPosted: Mon Jul 04, 2022 5:54 pm
by [violet]
Sweeze wrote:would it be preferred for a userclick timestamp to be included as a header or a url parameter?

It will be ignored as a header, so don't bother with that. It will be ignored by me as an URL parameter, too, since I have no way of verifying that number, but I understand Elu has suggested it might be helpful in some circumstances.

Esfalsa wrote:ask if the answer would be the same regardless of the language/platform used

Same answer either way. Also note that officially scripts must always send a UserAgent header with contact info -- we understand that some can't do this due to technical limitations, in which case an URL parameter is the next best thing, but it's not a user preference; you must configure a header if possible.