The best way to prevent taeniasis is to cook meat thoroughly. Freezing to -5degC for 4days, -15degC for 3 days, or -24degC for 1day kills the larvae as well. For Taenia solium, extra care and hygiene(eg frequent hand washing) must be used to keep from swallowing eggs and developing cysticerci in the brain. It is important to buy meat from certified sources like good abattoirs.
Attribution: Avallain