How to detect Browser type in Django?

前端 未结 5 1479
北恋
北恋 2020-12-23 16:05

How can i detect which browser type the client is using. I have a problem where i have to ask people to use different browser (Firefox) instead of IE. How can i get this inf

5条回答
  •  感动是毒
    2020-12-23 16:26

    You can look into the 'user agent string' and parse out the values.

    Here's the relevant docs, specifically on (HTTP_USER_AGENT):

    http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.META

提交回复
热议问题