Block pages when user access using IE

1 reply · opened Mar 8, 2021

RrizquhamaulidaMar 8, 2021

Dear Support,

so when I developed my website with envato, the end result was that there were some components that were broken in IE, I wanted to block my website when the user opened it using IE only, but when I added this code, my website also couldn't be opened on apple devices like IOS and macbook. Can you help me with this?

if (navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Firefox") == -1) {
window.onload = function () {
document.body.innerHTML = '<div style="background-color:white; padding: 10px;"><center>Sorry for your inconvenience but for our website is not supported yet for Apple Device and IE Browser. Please use Google Chrome Or Mozilla Firefox on your Desktop or Android Device</center></div>';
}
}

Thankyou.

Warm

SSemicolon WebSTAFFMar 9, 2021

Hello,

The Codes you are trying to use is incorrect and blocks Safari Browser. Since this code is currently not the part of the Default Codes, you will need to manually add your Custom Codes as this is part of Customization and we currently do not provide Customization related Support according to the Item Support Policy: https://themeforest.net/page/item_support_policy . You will need to manually code this or Hire a Freelancer to help you out.

You consider using this Library: https://modernizr.com/ .

Let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard