0

I don't want IE 7 users to use the website. It may not be a good idea, but I don't mind turning away users. How do I redirect users using IE 7 or less to a static page and stop them from using my website? Currently, I have this code in my application.html.erb which redirects the user to an external site. But, I'd like it to redirect it to a static page within my app:

<!--[if lt IE 8]> <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.google.com"> <![endif]--> 

1 Answer 1

1

Add a condition in application view

<% if params[:controller] != "static_pages_controller" %> <!--[if lt IE 8]> <meta HTTP-EQUIV="REFRESH" content="0; url=<%= static_pages_url %>"> <![endif]--> <% end %> 

Here assuming that index method inside the static_pages controller is the static page.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.