This is true. The problem is that using caffeine to control headaches can lead to a vicious cycle of caffeine dependence, as sometimes caffeine consumption or withdrawal actually leads to headaches.

So popping an acetaminophen, an ibuprofen, or an aspirin is probably a better solution for headache control.