I have an action that sends an image file rather than a rendered view
and want the image to be cacheable buy proxies and the browser to reduce
load on the site. Currently the image can't be fully cached as Cake
always sends a Cookie.
Note: the image has to be sent through the controller for security
reasons, so I can't just place it in 'webroot' or 'img' for direct access.
The question: how do I prevent Cake (1.2) from sending a cookie?
I have looked into the Cookie Component and tried the following things:
Setting the $cookieSecure value in the controller:
var $components = array('Cookie);
var $cookieSecure = true;
As the images are being sent over an http connection this should prevent
a cookie from being sent (according to the documentation), but the
cookie is still sent.
I have also tried destroying the cookie in the action:
$this->Cookie->destroy();
No luck with this either.
Any suggestions on how to prevent Cake sending a cookie would be greatly
appreciated.
Regards,
Langdon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---