When browsing using Firefox, here is how to automatically open different file types by preferred programs:
Go to Tools > Options or type the following from the address bar:
Choose General options and scroll down to Applications.
There are various file types listed in this Applications list that for which default programs can be set. Choose as needed for frequently used file types. The default action for opening various file types in Firefox is Always Ask or Preview in Firefox. So you’d be prompted everytime about what to do when accessing them.
Change it from the Action drop-down menu by associating default applications for various file types. So for example, if you’d like a PDF program to launch whenever a PDF file is opened or a default email program when sending emails, those settings can be changed from here.
Also, if you want to save these files locally first before directly opening them, choose Save from the drop-down menu. (If you’d like to disable downloading files in Firefox, Public Fox is a useful add-on for that ).
All done.