javascriptbootstrap-4browser-support

Javascript code to detect Bootstrap 4 support


I am developing a website in which Bootstrap 4 for UI design. Since bootstrap 4 did not support in IE 8 and some older version of Browsers.

I would like to show an error page if user is using any unsupported browser.

I need a javascript code to detect bootstrap 4 browser.

And Is there any JavaScript code to identify bootstrap 4 support rather than checking with each supported browsers/version manually? If possible I need Javascript code to detect bootstrap 4 support, not browser detection.

Means without using

if(browser == IE && BrowserVer > 8)
{
  supported = true;
}
else if......

Because if any user is using any browser other than IE, Edge, Safari, Chrome, Firefox, which may support/unsupport bootstrap 4 that case the code like above will fail.

Please help...


Solution

  • Why do you want to do this?

    From bootstrap web site,

    Bootstrap supports the latest, stable releases of all major browsers and platforms. On Windows, we support Internet Explorer 10-11 / Microsoft Edge.

    They mentioned all stable major releases are supported. With supporting ESR versions. Im not so sure but they meant by it, that currently latest browser versions and all future versions could handle bootstrap 4 as it should be.