How could a software reliably tell if an URL makes me download a file and what its filename and mimetype are? (without downloading the file) [migrated]

In order to write an application for myself that prevents me from visiting websites that let me download files of a certain type, I am trying to find a way to reliably tell if an URL lets me download a file and if so then tell me the filen… Continue reading How could a software reliably tell if an URL makes me download a file and what its filename and mimetype are? (without downloading the file) [migrated]