[development] Internet Explorer Print Loses User Context

Ron Parker sysop at scbbs.com
Thu Oct 9 01:13:00 UTC 2008


> I discovered that in Internet Explorer, the printer-friendly page 
> comes up with the correct logo in the browser. But, when "Print" (or 
> "Print Preview") is clicked, the browser makes another httpd call to 
> the site. This call contains NO context info: No user, group, 
> $_SESSION, referrer info, nothing. Therefore, my program cannot 
> select the correct logo. 

I seem to have resolved my problems by adding this to my code in a couple of places: 

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 
header('Cache-Control: no-store, no-cache, must-revalidate'); 
header('Cache-Control: post-check=0, pre-check=0', FALSE); 
header('Pragma: no-cache'); 

cache_clear_all(); 

This doesn't help the problem with the $user context disappearing (I solved that by creating a variable using the user's ip address and storing the info I need there - very crude, but works), but by forcing the browser not to cache the image I am dynamically creating. 

Thanks for the suggestion. 

-ron 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20081008/a8a00f14/attachment.htm 


More information about the development mailing list