Topic: AJAX user agent

Posted under e621 Tools and Applications

So, because of how AJAX works, I can't set my own user agent, so I can't include my username if it goes haywire. It's a simple viewer, so it shouldn't do that, but still. Is it okay if it says that it's a browser?

Updated

jtvjan said:
So, because of how AJAX works, I can't set my own user agent, so I can't include my username if it goes haywire. It's a simple viewer, so it shouldn't do that, but still. Is it okay if it says that it's a browser?

You can also mark your client by adding a url query param of client_agent and putting the information there. That gives us a quick indication of client without a modified user agent.

If the requests are coming from a web browser, a web browser user agent is appropriate. Web browsers will behave like web browsers, while standalone API clients usually don't behave like web browsers. CloudFlare has a history of throttling and blocking clients that pretend they are a web browser, but are clearly not behaving like a web browser.

Updated by anonymous

KiraNoot said:
You can also mark your client by adding a url query param of client_agent and putting the information there. That gives us a quick indication of client without a modified user agent.

Thanks! Added that. Once it's more fleshed out, I'll probably create a thread for the client. (https://github.com/jtvjan/e621MDL)

Updated by anonymous

  • 1