Various methods can prevent bacterial and viral illnesses. Handwashing, food handling, and avoiding infectious people can prevent both forms of diseases. Vaccinations prevent particular viral illnesses.