Bootstrap Cdn Does Not Work In Ie8
I am trying to publish my website using Bootstrap CDN and want it to work correctly in IE8. However, when referencing the Bootstrap CSS on my web server, Bootstrap works perfectly
Solution 1:
What caused the problem is the limitation of respond.js. According to README of respond.js, respond.js can not parse s hosted on CDNs by default. So, adding codes is required. The following is the example working correctly in IE8.
<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8" /><metahttp-equiv="X-UA-Compatible"content="IE=edge" /><metaname="viewport"content="width=device-width, initial-scale=1" /><title>brief example</title><linkhref="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /><!--[if lt IE 9]>
<script type="text/javascript" src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script type="text/javascript" src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/.html" id="" />
<link href="respond.proxy.gif" id="" />
<script src="respond.proxy.js"></script>
<![endif]--></head><body><divclass="container"><divclass="row"><divclass="col-sm-6">
left side
</div><divclass="col-sm-6">
right side
</div></div></div><scripttype="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script><scripttype="text/javascript"src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script></body></html>
respond.proxy.gif
is the file downloaded from https://github.com/scottjehl/Respond/raw/1.4.2/cross-domain/respond.proxy.gif
.
respond.proxy.js
is the file downloaded from https://github.com/scottjehl/Respond/raw/1.4.2/cross-domain/respond.proxy.js
.
Solution 2:
Instead of
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
Use
//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
(omit the "https:")
Solution 3:
I think, this is not problem. Try to run your project from any server. like localhost
or webserver
. I prefer to use webserver
. May be problem will be solved.
Post a Comment for "Bootstrap Cdn Does Not Work In Ie8"