Thanks so much for the quick reply, it was helpful. It sounds like neither of us know WHY the "open or save" thing happens with "no-cache" or "no-store." That's what I'd really like to know. Is this by design, or is it a bug in IE?
If you run across any more info on this, please let me know. Thanks for your help. Dylan Miller Solimar Systems, Inc. -----Original Message----- From: Daniel Grace [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 2:59 PM To: Dylan Miller Cc: [EMAIL PROTECTED] Subject: Re: open or save problem I've CC'd a copy of your message plus this reply to the PHP mailing list for the benefit of the rest of the PHP community as well. (That and one of them might have a solution to this) I never found a clean solution to this problem with PDF files with cache: no-cache set. There are a couple of ways around this that I know of: 1. Rather than outputting the PDF file, physically create it in a web-accessible directory (with some randomly-generated filename, md5(uniqid("pdf")) . ".pdf" would work) and redirect the user to it. 2. Better, dump the entire PDF file into a database using some uniqid() to reference it and a timestamp, and redirect to a PHP script that doesn't use sessions/doesn't send the cache-control header (or uses cache-control: private) which pulls the PDF back out of the database and feeds it to the user. The timestamp can be used to automatically delete the file after a short time, 5-30 minutes later depending on the length of the PDF. Neither of these solutions are perfect, however, and if the PDF contains security-sensitive information you still have the same problem as they'll be cached. If you want to do further research into this, I periodically hear something about an issue between Apache and PDF, but I don't know the details of that. It's possible the problems are related -- if so, there may be a fix somewhere on the Apache site. -- Daniel Grace ----- Original Message ----- From: "Dylan Miller" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 30, 2002 1:17 PM Subject: open or save problem > Daniel Grace, > > Hi, I saw a post of yours on the php.general message board: > > http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF8&selm=20020302062 > 856.49458.qmail%40pb1.pair.com > > I'm writing a program to send a PDF file to a browser, and I get the exact > problem you describe when I set Cache-Control to no-cache. If I remove the > Cache-Control header, everything works fine, but with it in there, I get the > "open or save" dialog with open grayed out. For security reasons, I'd like > to avoid caching. > > I was just wondering if you ever found out anything more about this. I've > been reading and searching the web, and your post was the only thing I could > find related to this issue. I'd really appreciate any insight you could give > me. > > Thanks, > Dylan Miller > Solimar Systems, Inc. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php