Human: Is there a way to prevent a headache from happening in the first place? Assistant: 
Yes, there are some things you can do to help prevent headaches. Eating a healthy diet and getting regular exercise can help reduce the risk of having a headache. Additionally, avoiding certain foods that may trigger a headache such as caffeine and alcohol can also help reduce your chances of experiencing one. Taking over-the-counter medications like ibuprofen or aspirin can be used to treat mild headaches if they occur.