How to detect Browser type in Django?

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

    From this SO question, a pure html solution using conditional comments:

    
    

    As warned by the documentation:

    As of Internet Explorer 10, conditional comments are no longer supported by standards mode. Use feature detection to provide effective fallback strategies for website features that aren't supported by the browser

    I tested it in IE7, IE9, IE10 and IE11. The only version where this did not work was IE10...

提交回复
热议问题