Hi,

to disable caching for the image itself you must set the appropriate headers on 
the image request itself.
It is absolutely irrelevant if you're using Zend_Layout. Do you use static 
images, or dynamically created ones?
If your images are static resources you have to look at your webserver 
configuration on how to set HTTP headers for specific requests - this has 
nothing to do with the Zend Framework then. 
If you use dynamically created images or images served through an action method 
of a controller you can use the procedure noted below.

Best regards

-----Ursprüngliche Nachricht-----
Von: dele454 [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 20. September 2008 06:31
An: [email protected]
Betreff: Re: AW: [fw-general] HeadMeta Helper...


Thanks for this

Am using the Zend_Layout how then do i make my layout scripts see this
declaration after adding it to my action controller. At present though i
have added it to my controller it isnt visible on my layout template and
image is still caching

Thanks



Stefan Gehrig wrote:
> 
> He dele454,
> 
> you cannot set HTTP-EQUIV meta-tags on an image... These are (X)HTML-tags
> to
> be used in (X)HTML-pages - images on the other side are send as binary
> data
> in the according format (JPEG, GIF, PNG for example), adding meta-tags to
> these data-streams has no effect other then corrupting the image data.
> You have to set the response headers in your action accordingly:
> 
> <?php
> $this->getResponse()->setHeader('Content-Type', 'image/jpg');
> $this->getResponse()->setHeader('Cache-Control', 'no-cache');
> [...]
> ?>
> 
> Best regards
> 
> Stefan
> 
> -----Ursprüngliche Nachricht-----
> Von: dele454 [mailto:[EMAIL PROTECTED] 
> Gesendet: Samstag, 20. September 2008 03:52
> An: [email protected]
> Betreff: Re: [fw-general] HeadMeta Helper...
> 
> 
> i have tried something like this but to no avail:
> 
> <?php echo  $this->headMeta()->appendHttpEquiv('expires', 'Wed, 26 Feb
> 1997
> 08:21:57 GMT')
>                           ->appendHttpEquiv('pragma', 'no-cache')
>                           ->appendHttpEquiv('Cache-Control', 'no-cache')
>                         ->appendHttpEquiv('Content-Type', 'image/jpg');
> ?>
> 
> 
> dele454 wrote:
>> 
>> Hi
>> 
>> Does anyone know the correct directive for disallowing caching of images
>> using the HeadMeta Helper?
>> 
>> After replacing some remotes images via an upload, my browser still
>> caches
>> the old image. I dont want this. Someone suggested having an apache
>> directive that refuses caching of images. 
>> Please help.
>> 
>> Thanks
>> 
> 
> 
> -----
> dee
> -- 
> View this message in context:
> http://www.nabble.com/HeadMeta-Helper...-tp19574276p19581853.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 
> 
> 
> 


-----
dee
-- 
View this message in context: 
http://www.nabble.com/HeadMeta-Helper...-tp19574276p19582595.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Reply via email to