The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    Redirect page when Javascript Disabled

    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Redirect page when Javascript Disabled

    Post by TamDonCo Sat 27 Aug 2016 - 15:06

    Hi All

    Is any way to redirect to another page when users disable their javascript ??


    Last edited by TamDonCo on Sun 28 Aug 2016 - 4:44; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Redirect page when Javascript Disabled

    Post by Ange Tuteur Sat 27 Aug 2016 - 16:01

    Hi @TamDonCo,

    Yes, this is possible, however it can negatively impact your SEO because some bots that crawl your forum don't use JavaScript. Furthermore, it can also affect noscript users on your forum, thus turning them away. I'd advise against doing this. Instead, I'd recommend just adding a small notice somewhere in the overall_header like :
    Code:
    <noscript>
      <div id="noscript-notice">Our forum runs best with JavaScript enabled !</div>
    </noscript>

    Then you can use CSS to style it, like fix it to the screen for example :
    Code:
    #noscript-notice {
      color:#FFF;
      font-size:13px;
      font-weight:bold;
      background:#C00;
      padding:6px;
      position:fixed:
      left:0;
      right:0;
      bottom:0;
      overflow:hidden;
      overflow-x:auto;
      white-space:nowrap;
    }


    BTW here's a good ol' stackoverflow topic on this :
    http://stackoverflow.com/questions/7129527/noscript-redirect-would-it-affect-search-engine-optimization

    The code you're looking for is provided by the author, you'd need to add it in the overall_header if you're still up for doing this.
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Redirect page when Javascript Disabled

    Post by TamDonCo Sat 27 Aug 2016 - 16:06

    Thank You very much, Ange Tuteur

    I will test it later when I have time

    Have a nice weekend
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Redirect page when Javascript Disabled

    Post by TamDonCo Sun 28 Aug 2016 - 4:43

    Thanks a lot Ange Tuteur

    I modified a little for my need
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19324
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Redirect page when Javascript Disabled

    Post by Ape Sun 28 Aug 2016 - 13:36

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    Redirect page when Javascript Disabled Left1212Redirect page when Javascript Disabled Center11Redirect page when Javascript Disabled Right112
    Redirect page when Javascript Disabled Ape_b110
    Redirect page when Javascript Disabled Ape1010

      Current date/time is Sun 22 Sep 2024 - 12:18