1

I'm currently using bootstrap 4 for my projects.

As before using the bootstrap i used html5shiv cause it was needed to provide compatibility for IE Browsers older than IE 9. Otherwise html5 elements won't support as you all know. So, my question do we need to declare the html5shiv along with new bootstrap 4 ?

1 Answer 1

4

No, you don't need to declare html5shiv in Bootstrap 4. Here's what the basic HTML template for Bootstrap 4 looks like:

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
  </body>
</html>

Also, while Internet Explorer 10+ is supported in Bootstrap 4, IE9 and down is not. More about supported devices:

https://getbootstrap.com/docs/4.0/getting-started/browsers-devices/

5
  • Isn't this the reason why developer use html5shiv to support their html5 tag styling in ie9 or older version?
    – Legend
    Jan 14, 2018 at 18:24
  • and whyy use popper.min.js? isnit it tether.min.js?
    – Legend
    Jan 14, 2018 at 18:25
  • 1
    This isn't really a place for philosophical discussions. You asked a question, I answered it. Bootstrap clearly states on their website that if you need to support IE9 or older, you should use Bootstrap 3. So, it's them who made that decision, not me. Jan 14, 2018 at 19:17
  • 2
    The most recent version of Bootstrap 4 (which is beta 3) is using popper.js instead of tether.js. It doesn't really matter why. This is just something they decided to do. We have to use that if we want to use Bootstrap 4. The next version of Bootstrap 4 will be the final release and they aren't gonna introduce any breaking changes there. So, it will be popper.js from now on. Jan 14, 2018 at 19:22
  • I didn't ask you why they did something.
    – Legend
    Jan 15, 2018 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.