0

stylesheets can be made to load only for some devices using:

<link href="big.css" rel="stylesheet" media="screen and (min-width: 768px)">

OR

<style media="screen and (min-width: 768px)"></style>

Is there an equivalent way to load specific scripts for specific devices? I cannot modify the script since it is provided by third-party cdn imported using: <script src="https://example.com/script.js"></script>

Shantanu Aryan
  • 166
  • 4
  • 11
  • Check for User Agent or screen sizes. – m1k1o Jul 05 '19 at 11:45
  • 2
    This questions might be useful [How to load or not a JS script (into the head section) based on screen resolution?](https://stackoverflow.com/questions/31848465/how-to-load-or-not-a-js-script-into-the-head-section-based-on-screen-resolutio) and [Call external JS file based on “media screen” value](https://stackoverflow.com/a/15823281/5533075) – Dwhitz Jul 05 '19 at 11:51

0 Answers0