A post by Joseph Scott regarding why IE balks when downloading dynamically created “files” from PHP scripts has allowed me to solve an annoying issue with a PHP app I’m developing at work.
IE is so dumb. When you “save” a file in IE, it looks in its cache for a copy to save. If the script that generated the file has told the browser not to cache the content IE obediently obliges by deleting (or not storing) the content in its cache and so when the save dialog goes looking for the file it can’t find it and promptly explodes with an error message.
What fuck knuckle coded this abortion? Jesus.
Every other browser in existance works just fine. They don’t cache the page result but they do at least save the damn file you were just sent by the webserver.
How to solve this issue? Emit a Cache-Control header that tells the browser to cache the file for a few seconds. At least long enough for the download to complete. I want to find the IE developer responsible for this fuckup and pour shit down his throat. Angry orj, angry!
What’s the bet that this is still broken in IE7?