[development] Internet Explorer Print Loses User Context

Ashraf Amayreh mistknight at gmail.com
Thu Oct 9 11:49:34 UTC 2008


Just out of curiosity, does all these calls pass through drupal's menu
system? Anything that doesn't will naturally not contain any of
drupal's context variables.

On 10/9/08, Ron Parker <sysop at scbbs.com> wrote:
>> 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
>


-- 
Ashraf Amayreh
http://aamayreh.org


More information about the development mailing list