开发者

Django - How do I redirect ie6?

开发者 https://www.devze.com 2023-01-22 04:41 出处:网络
I want to send a user to a page on my site that prompts him to upgrade to a more recent browser if they are using ie6 or lower.

I want to send a user to a page on my site that prompts him to upgrade to a more recent browser if they are using ie6 or lower.

How can this be achiev开发者_高级运维ed in Django?


You want to use Middleware. Specifically, you want to sniff the browser agent in the process_request of your middleware, and return a HttpResponseRedirect if the browser agent indicates IE6.

There's a snippet that should get you started here. Do post a comment if you need help with it!

0

精彩评论

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

关注公众号