Some malware and malicious scripts may prevent you from closing your browser properly... In some cases you may need to crash your web browser via the task manager, or reboot (even hard-boot) your computer altogether. If your browser retains information on your last open session you may end up opening up the same (infected or hijacked) web site automatically upon browser start-up. Below is a way to prevent this on newer Firefox browsers:
In Firefox address bar type about:config, confirm security warning if necessary and type resume in the search field (picture below)...
If you want Firefox to ask you before restoring last crashed session, open and set browser.sessionstore.max_resumed_crashes to 0
If you want to bypass crashed session restore window and go directly to your preset home page set browser.sessionstore.resume_from_crash to false
Have not played around with other advanced settings - please, be careful!