MEDIA QUERIES to Load specific HTML file

Hello. I’m looking for a short media query/JavaScript script that will tell the browser to load a specific html file depending on the device or the browser width. Any tutorials anyone can point me to? Thank you in advance.

FS