Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practices for custom http user-agent strings? [closed]

I'm developing an application that communicates with an internal web service using HTTP.

Are there any "best practices" for custom user-agent strings so that I can put a nice one in my app? It's a Python library and the lower transport is Python's own httplib. Should the user-agent string say that or something else?

like image 469
Noufal Ibrahim Avatar asked May 04 '10 07:05

Noufal Ibrahim


People also ask

How long can a user agent string be?

Depending on web-server and their settings these limits vary from 4KB to 64KB (total for all headers). Apache limits the maximum field length to 8k (httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize).

What should UserAgent be?

So if you're creating a new user agent for your browser, bot, app or script, it's a very good idea to keep your user agent as simple as possible - only use letters, numbers and basic symbols (brackets, hypens, slashes etc).

Can user agent be spoofed?

The process is called user-agent spoofing. Yes, when a browser or any client sends a different user-agent HTTP header from what they are and fake it that is called spoofing.

Is User Agent a string?

The User-Agent (UA) string is contained in the HTTP headers and is intended to identify devices requesting online content. The User-Agent tells the server what the visiting device is (among many other things) and this information can be used to determine what content to return.


1 Answers

For internal use you can use anything really.

Of course, internal or external its always a good idea to include contact information, either web or email address, in case something breaks or application goes out of control.

Check this big list of user agents for inspiration: http://www.user-agents.org/

like image 147
zaf Avatar answered Oct 04 '22 19:10

zaf