|
Posted by Ian Hobson on 12/02/07 12:45
To follow up my own post...
I've cracked it. :)
It appears that
1) PHP sends various "do not cache" headers as standard.
2) Browsers who receive content for display in another application store
the file and pass the filename to the application for display.
Except for IE 6 and 7.
These sees the "no cache" headers and do NOT store the file, yet they
still pass the filename to Adobe Acrobat for display. Go figure!
The solution is to replace all the headers the system generates with "do
cache" versions. The crucial frament of code is now...
header('Content-Disposition: inline; filename="quote27.pdf"');
header('Content-type: application/pdf');
header('Cache-Control: maxage=120');
header('Expires: '.date(DATE_COOKIE,time()+120)); // Cache for 2 mins
header('Pragma: public');
Lets hope that 120 seconds is long enough for IE to see it as future,
even when the clocks are a bit wrong, and short enough that the user has
not the time to see an error, fix it and call for a reprint!
Hope that helps someone....
Regards
Ian
Navigation:
[Reply to this message]
|