Is it better to use oil to coat a glass pan for baking, or butter?

I have been using a glass pan for baking twice recently, and both times, the edges come out darker than what I would like. I have been using oil to coat the pan as well, should I use butter instead for better results?