Stevie See talks a lot of sense.
As well as treating the acute symptoms you need to look at the underlying cause. In my case that was pronation and poor gait.
I look fine to the untrained eye when running, but it's a common problem to not develop and use your glute muscles enough so you end up using your hip flexors for stability and your hamstrings and thighs too much for power.
A long term programme of Pilates with the specific aims of developing and importantly recruiting my glute muscles and also improving my knee tracking (to reduce pronation) has really helped me.
A good physio could prescribe you exercises to correct those gait issues (whether using Pilates methods or not).
A couple of weeks ago I was on holiday and somewhat recklessly increased my mileage quite a bit, whilst simultaneously doing all my runs in very mountainous terrain. A couple of years ago that would have been a recipe for an ITB flare up. In the event, I just felt a little tight the next week, which dissipated with my regular foam-rollering.
Sorry, I don't mean to sound smug, but having had a couple of distressing bouts in the past that made me wonder whether I'd have to give up running, I'm really convinced that you need to see ITB prevention as a long term strategy. You can make those exercises part of whatever weekly conditioning/weights session you do, which will stand you in good stead anyway.