Using Media Queries To Only Include JS Files On Mobile
How about using javascript for that?
<script type="text/javascript">
if (screen.width < 980) {
document.write('<script type="text/javascript" src="mobile.js"></script>');
}
</script>
Using Media Queries To Only Include JS Files On Desktop
Try window.innerWidth
,
if (window.innerWidth > 980) {
document.write('<script type="text/javascript"> ....... </script>');
}
Media Queries to load resource?
If you make this, your site will not be responsive. Responsive said that design adapts to resolutions, not only devices, and when a desktop screen has a 600 px width you must to show tablet version, no? The best way to reduce the files is minifying all your css in one file in production version, and in dev version you have got all splitted css
Related Topics
Jquery .Show() Not Revealing a Div with Visibility of Hidden
Using JavaScript to Override or Disable Meta Refresh Tag
Attribute Onclick="Function()" Not Functioning as Intended
Cross Browser Rgba Transparent Background While Keeping Content (Text & Images) Non-Transparent
How to Properly Escape Attribute Values in CSS/Js Attribute Selector [Attr=Value]
How to Detect MAC Os Inverted Color Mode in JavaScript/Css
Force Address Bar to Show in Mobile Chrome App
How to Know What Elements Are in Current Mouse Position
Is It Normal to Have Two Elements with Same Id in Two Div Elements with Other Id
Executing JavaScript After X Seconds
Playing HTML5 Audio in Android Browser
Good Beginners Tutorial to Socket.Io
How to Make a Div Always Float on the Screen in Top Right Corner
Render Closing Tag Conditionally in Order to Emulate Calendar Behavior