开发者

Is it possible to detect the browser version from Django server side?

开发者 https://www.devze.com 2022-12-24 13:57 出处:网络
in server side开发者_开发百科, not browser. You can use the HTTP_USER_AGENT in HttpRequestrequest.env[\'HTTP_USER_AGENT\'] will give the user agent string the browser sent.Unfortunately request.env wo

in server side开发者_开发百科, not browser.


You can use the HTTP_USER_AGENT in HttpRequest


request.env['HTTP_USER_AGENT'] will give the user agent string the browser sent.


Unfortunately request.env won't work.

However, you can get it through request.META.get("HTTP_USER_AGENT")

0

精彩评论

暂无评论...
验证码 换一张
取 消