Other people find heat to be effective during a headache. So if one method doesn't work for you, try the other. In general, heat increases blood flow to head and neck muscles and can help relax them. Ice reduces the sensitivity of pain nerve endings and can help override pain impulses. Watch your posture.
Poor posture can contribute to headaches.
People who work in the same position for long periods of time are especially susceptible to this. If your job requires you to stay in a fixed position, be sure to stretch, stand up, move around and take breaks every hour or so. Stretch your neck and shoulder muscles. Tightness in these areas commonly accompanies headaches. Loosening these muscles can stimulate circulation and help you relax, both of which may help relieve your headache.