How to detect Browser type in Django?

前端 未结 5 1456
北恋
北恋 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:29

    To detect if is internet explorer 8 or older IE:

    is_IE_8_or_lower = re.findall(r'MSIE [2-8]',request.request.META['HTTP_USER_AGENT'])
    

提交回复
热议问题