How can migraines be prevented and what are their common triggers?

How can migraines be prevented and what are their common triggers?