"Prompt engineering" must be the easiest job to replace with AI. You can simply ask an LLM to generate and refine prompts.
elrik
Or wear a respirator while you sand...
That's correct, it is just plain text and it can easily be spoofed. You should never perform an auth check of any kind with the user agent.
In the above examples, it wouldn't really matter if someone spoofed the header as there generally isn't a benefit to the malicious agent.
Where some sites get into trouble though is if they have an implicit auth check using user agents. An example could be a paywalled recipe site. They want the recipe to be indexed by Google. If I spoof my user agent to be Googlebot, I'll get to view the recipe content they want indexed, bypassing the paywall.
But, an example of a more reasonable use for checking user agent strings for bots might be regional redirects. If a new user comes to my site, maybe I want to redirect to a localized version at a different URL based on their country. However, I probably don't want to do that if the agent is a bot, since the bot might be indexing a given URL from anywhere. If someone spoofed their user agent and they aren't redirected, no big deal.
~~It's a gif with audio.~~
Edit: I was completely wrong about this. It's an MP4. My bad!
User agents are useful for checking if the request was made by a (legitimate self-identifying) bot, such as Googlebot.
It could also be used in some specific scenarios where you control the client and want to easily identify your client traffic in request logs.
Or maybe you offer a download on your site and you want to reorder your list to highlight the most likely correct binary for the platform in the user agent.
There are plenty of reasonable uses for user agent that have nothing to do with feature detection.
My greatest regret is that I have but one upvote to give!
I see triangles, I upvote.
You know what this reminds me of? Alex Jones repeatedly lying about the Sandy Hook school shooting and having to pay over a billion dollars after his followers repeatedly harassed and threatened those families.
How is this thoroughly debunked lying by Trump and Vance any different?
Will Gaza even be habitable in 50 yrs after Trump is elected when enough people vote third party?
My assumption is this is a negotiating tactic with the Harris campaign as no serious person believes a third party candidate will win, and if they actually believe Trump would be better for their cause they might as well endorse him.
Unfortunately Harris is in a tough spot. If she doesn't remain vaguely aligned with the current admins policy on Gaza, she's going to undermine whatever efforts are currently underway towards a cease-fire.