Random Blank Pages Defeated!

I’ve been battling this fiendish problem for weeks now. Seemingly randomly, blank pages would result from clicking navigation links in a site I was working on, and only in Internet Explorer. The page didn’t load at all. The URL stayed the same, the source couldn’t be viewed, and clicking refresh fixed it. The problem didn’t occur on my server at home (I don’t have the internet), so I didn’t have a lot of time to test it live, only a half hour during my lunch break at work.

It’s frustrating not knowing what’s causing a problem, and for a while, I just ignored it. But then it popped up again in another site! This time it only happened to one page. That should narrow it down, I thought. I’ll just compare this page with one that works and isolate the problem. That didn’t quite work out because I focused on the wrong area. I thought the problem all along was using some simplexml functions in php, and when I found a difference in the way I looped through some data, I thought that was it. It wasn’t. Then I started getting mad and taking out random things. Suddenly, when I commented out an include that checks the session to see whether someone is logged in or not, it worked! But I kind of needed that bit. So I started taking out other stuff, this time in the html.

And then I found it. The evil little monster, the source of my nightmares, the thorn in my side! Gaze upon it if you can muster the courage!

<meta http-equiv="content-type" content="text/html; charset=windows-1250">

This line of code was generated from the template file I used in PSPad. I don’t have much knowledge of meta tags or why it would break only IE. Maybe it has something to do with caching, I don’t know. All I know is that my pages work now. If any of you know, please leave a comment.

2 Responses to “Random Blank Pages Defeated!”

  1. Ryan

    That’s weird, I’ve always used charset=UTF-8 and I’ve never had that problem before, but at least you figured it out. Good job.

  2. C

    Brilliant! This has been bugging me for awhile. I was actually using utf-8 and it was still causing me problems. Removed the whole meta tag and everything works fine now.

Leave a Reply