开发者

Rails 3: Redirect all IE6 and IE7 traffic to an incompatible browser page

So I've migrated my old php site to my lovely new rails site, changed all the tags to rails appropriate tags

ie:

<img src="images/image.png" width="200px" height="150px'>

to

<%= image_tag 'image.png', :size='200x150' %>

In Chrome, Safari, Firefox, IE8 everything looks b-e-a-utiful. Problem is, Microsoft doesn't build nice browsers, and worse they are the default on all windows machines. And to top it off not everyone knows or has taken the time to upgrade from these old guys.

My problem is that IE6 doesn't suport png transparency and IE7 doesn't format rails code property (or I'm seriously missing something, its not my css because the simple < br /> doesn't show right, and I've looked elsewhere) My answer to reason would be to force IE6 & IE7 users to an incompatible browser page, but I'm not sure how to go about doing that. I'd like it to do that no matter what 开发者_如何学Pythonpage they show up on, home or otherwise, so I'm guessing it would be a helper or based in routes.

Any Clues?


I don't think it's a good idea of turn away users, but FYI you might be able to use Rack::NoIE.


Turns out, the best method is to go through the code line by line and figure out the conflicts. Its now IE7 friendly, its to bad IE6 doesn't support png transparency.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜