You are here: Re: php, Adobe and IE getting things wrong again. « PHP Language « IT news, forums, messages
Re: php, Adobe and IE getting things wrong again.

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация