I need to detect the download capabilities of the users device in order to figure out whether I should give them a large 50mb video to download or a small 40kb image to download.
My first thought was to detect the internet connection of the user (wifi/3G/LTE) and then serve the file based on the result. However there is no clear way to do so unless using the extremely unreliable navigator.connection
Should I detect download speed or is there a better method. I want to know the most reliable method.