A stricter version of this (which I prefer) is baked into latest Firefox: Tick Enable HTTPS-Only Mode in all windows at the bottom of about:preferences#privacy. It upgrades to HTTPS whenever available, and otherwise shows you a warning that you're about to load an unsecured HTTP site.