Edit: I got this backwards. Comment below me has a link that explains caffeine is a vasoconstrictor that relieves headaches caused by swollen blood vessels.
Caffeine is a vasodilator, meaning it causes your blood vessels to expand. This counteracts vasoconstriction, or the shrinking of blood vessels which is a common cause of headaches.
Latest Answers