Answer the question
In order to leave comments, you need to log in
How to maximally cross-browser separate the call of scripts and styles in browsers depending on the browser?
I welcome
As a matter of fact the task is simple, but got confused in various variants of implementation. How to separate the call of scripts and styles depending on the browser? Only two conditions are needed:
1) if the browser is ie8 or a version less, then we load only these files (styles, scripts)
2) if it is any browser other than ie8 or a version less, then only these files (styles, scripts) are loaded.
if ie8 or lower:
style-ie.css
script-ie.js
else:
style-normal.css
script-normal.js
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="style-ie.css" />
<![endif]-->
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question