Know the factors
That can be a difficult thing to do, but if you know what brings on the headaches.
.. You can minimize those factors. 1) if they are seasonal headaches.. Seek allergy treatment 2) if they are persistent and chronic - it may be chronic infection
that needs to be treated 3) if related to weather changes or changes is altitude then you may need chronic medical therapy - nasal steroids