How to prevent the execution of certain scripts when switching to a mobile version of the site? Design is divided only into css styles. You need to disable unnecessary scripts for devices with a screen width of less than 1024.

  • 3
    nothing, just writing down the execution conditions in the scripts themselves - Grundy
  • maybe my monitor resolution is 800х600 , I don't have to run scripts now? Just the condition, as noted by @Grundy, put in scripts, such as if (isMobile()) return false; <continue script code> if (isMobile()) return false; <continue script code> . On the Internet you can find many ways to recognize the client application from which he is sitting - Vasily Barbashev

0