Hi Justin,

You almost got it right. You have to put ‘set expires’ and ‘set cache control’ 
before ‘write png’, because the interpreter stops executing after one of the 
‘write <image>’ commands.

What you *don’t* want to do is to set the response status. If you always return 
304, the browser will ignore the image. Just returning the proper cache headers 
will force the browser to cache the image, and subsequent requests – as long as 
the URL is exactly same, including query params – will come from the cache 
until it expires.

All the best,

  - Aparajita

> On Sep 29, 2016, at 7:40 AM, Justin Will <[email protected]> wrote:
> 
> Can someone advise on how best to set my cache control settings to allow my 
> images served from images.a4d to be cached by the browser for a period of 90 
> minutes?  I have been playing with this and not sure I have it right.  Here's 
> what I have tried and I get missing images if I put it before write png and 
> seems to do nothing after write png.
> 
> 
> 
>                set expires(90)
>                set cache control("max-age=5400")
>                set response status(304)  // no change
> 
> and when I try this either before or after write png it seems to do nothing.
> 
>                set expires(90)
>                set cache control("max-age=5400")
> 
> 
> Thanks
> Justin Will
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/


_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to