问题
Building a website using Bootstrap3 and I would like for it to work on IE. It seems to be working when I do include respond.js at the bottom of the page but I would like to make sure this is in fact true before I go live with it.
My question is simply, does it matter where I include my JS files specifically respond.js?
回答1:
From the GitHub page it says:
Reference the respond.min.js script (1kb min/gzipped) after all of your CSS (the earlier it runs, the greater chance IE users will not see a flash of un-media'd content)
回答2:
It is advised to include java scripts at the bottom of the page, but because we assume they have no effect on the first look of the page, and we want the users see some thing as fast as possible, so the page will get render and then the javascripts will be, but if the look of the website depends on the javascript library it should be in the header for a better users experience, libraries like modernizr respond and so on
来源:https://stackoverflow.com/questions/18680215/do-i-have-to-include-respond-js-in-the-header