1 Reply Latest reply on Jan 15, 2014 5:42 PM by webnewbie10

    Redirect IE8 users to a different page

    webnewbie10 Level 1

      My entire home page is an animation, with several different links on it. But it doesn't work on IE8, since that browser doesn't support html5.

       

      I want to add a redirect for IE8, 7, 6 users to a different home page. I searched and found several java scripts I could add, similar to the ones below. I  added them to the html file that was generated by edge after publishing. I  tried adding them in the head. Didn't work. Tried adding after

      <div id="Stage" class="EDGE-88555059">

          </div>

      Again, nothing.

       

      <!--[if IE 8]>

      <script type="text/javascript">

      window.location = "http://www.google.com/";

      </script>

      <![endif] -->

       

      Also tried

       

      <!--[if lt IE 9]> <div>

      <a href="http://www.google.com" TARGET="_blank">

      </a></div> <![endif]-->

       

      Please help! Thanks -- Jami

        • 1. Re: Redirect IE8 users to a different page
          webnewbie10 Level 1

          I kept searching online, and finally was able to figure it out.

           

          1. I needed to place the redirect script in the head of the index.html. I originally had placed it in my actual edge animation html BUT that animation was placed inside the index.html page. So that's the one that needed the redirect.

           

          2. Found that "location.assign" worked better than "window.location" in the script. Here's the script that works for me.

           

          <!--[if lte IE 9]>

          <script type="text/javascript">

          location.assign('http://www.mysite.com/index.html');

          </script>

          <![endif]-->

           

          Note 1: the "lte" in the conditional means less than or equal to IE 9, so it will redirect with IE 9 and lower.

          Note 2: I had to empty the cache/ delete history on IE 8 to get it to work.

           

          Hope this saves someone else the days I spent  searching for the answer.