[Mapbender-users] Configuration of PDF-print: download=true ?

Marc Jansen jansen.marc at gmx.de
Tue Feb 10 13:41:01 EST 2009


Hi Herbert,

I am not 100% sure but I faintly remember a bug that occured when 
streaming data to IE users. When download is true, a file simply gets 
opened in the browser, when it is false the file is streamed.

Citing from http://www.sitepoint.com/article/caching-php-performance/2/, 
a nice article btw.

"Internet Explorer handles downloads in a rather unusual manner: it
makes two requests to the web site. The first request downloads the
file and stores it in the cache before making a second request, the
response to which is not stored. The second request invokes the process
of delivering the file to the end user in accordance with the file's
type--for instance, it starts Acrobat Reader if the file is a PDF
document. Therefore, if you send the cache headers that instruct the
browser not to cache the page, Internet Explorer will delete the file
between the first and second requests, with the unfortunate result that
the end user receives nothing! 

If the file you're serving through the PHP script won't change, one
solution to this problem is simply to disable the "don't cache"
headers, |pragma| and |cache-control|, which we discussed in "How do I
prevent web browsers from caching a page?", for the download script. 

If the file download will change regularly, and you want the browser
to download an up-to-date version of it, you'll need to use the |Last-Modified|
header that we met in "How do I control client-side caching?", and
ensure that the time of modification remains the same across the two
consecutive requests. You should be able to achieve this goal without
affecting users of browsers that handle downloads correctly. 

One final solution is to write the file to the file system of your
web server and simply provide a link to it, leaving it to the web
server to report the cache headers for you. Of course, this may not be
a viable option if the file is supposed to be secured."

Bye,
Marc


Schönhammer schrieb:
> Hi list,
> in mapbender docu 
> (_http://www.mapbender.org/Troubleshooting_printPDF_), you can read:
> "Es empfiehlt sich, in der print_pdf.conf $download auf "true" zu 
> setzen. "
>  
> Unfortenately there is no explanation in the docu. Why should I set 
> "$download=true".
>  
> If download is set to "true", the temporary created pdf-files are 
> remaining in the server's directory.
>  
> If set to "false", the user need not to do another click and no 
> temporary files stay in server's directory.
>  
> So, could anybody explain, why download should be set to "true" ?
>  
> Thanks a lot
> Herbert
>  
>  
>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapbender_users/attachments/20090210/507400f3/attachment.html


More information about the Mapbender_users mailing list