Suffer from migraines? Device worn on the head may prevent them