Yes using Firefox can lessen the chances of infection, however several virus/ spyware companies- writers target popular sites used by many people.
There is no sure wy of not contracting spyware or viruses all you can do is have a decent Antivirus prgram good firewall and spyware stopper / detector.
I have had no problems since using
Avast4 click here
ZoneAlarm click here
Spywareblaster click here and MSoftAntispy Beta click here