Zantac - how long should I take it?

I have frequent heartburn and found that Zantac does a fantastic job of relieving the symptoms.  I've been having some headaches and a mild dizzy sensation and went off it a couple of days which caused the abatement of the headaches and dizzyness.  I've taken Zantac for 3 or 4 weeks and love that I don't struggle with heartburn but am concerned that maybe I should stop taking it - is it hurting me?
I take the generic equivalent of Zantac called Ranitidine. It's prescibed to me by my Gastro Doctor. I have been taking it for years. I take 150mg daily. Years ago my dosage was 300mg/daily. I'm ok with it. But my Doc knows my insides from both ends & I get checked yearly. When I read the Counseling sheet that comes with my prescription it points out cautions and possible side effects alerts. I do not know your gender so this caution may or may not apply:"this medicine is excreted in breast milk. If you are or will be breast-feeding while using this medicine, check with your doctor or pharmacist to discuss the risks to your baby". Under possible side effects: "a side effect that may go away during treatment is headache.If lt continues,or is bothersome, check with your doctor". It also lists a possible list of unlikely allergic reactions. The Zantac box should contain this same info some place! Like I say; I do OK by them but that's the only person I can speak for.