[Voiceglue] On audio caching and HTTP cookies

Archie Cobbs archie.cobbs at gmail.com
Tue Feb 17 15:19:56 EST 2009


On Tue, Feb 17, 2009 at 12:47 PM, Archie Cobbs <archie.cobbs at gmail.com>wrote:

> On Mon, Feb 16, 2009 at 2:08 PM, Doug Campbell <
> voiceglue at campbellcastle.com> wrote:
>>
>> The problem comes in determining which audio fetches are
>> static and which are dynamic.
>>
>> While I would like to be able to determine static versus
>> dynamic audio fetches by examining the server HTTP headers
>> Expires: <now>, Cache-Control: no-cache, Cache-Control:
>> private, and Cache-Control: s-maxage=0, I cannot wait for the
>> server response as by then it is too late to have sent cookies.
>>
>> So, I propose determining static audio fetches as those having
>> a VXML maxage attribute (or audiomaxage property if not defined)
>> not equal to 0.  Conversely, dynamic audio fetches have maxage
>> set to 0.  This gives the VXML script author full control over
>> whether to use the shared cache for any particular audio resource.
>
>
> I'm not an expert on this stuff, but surely there exists a "correct" answer
> that is in accordance with the HTTP protocol.
>
> For example, what does Google send with their logo image when you go to
> their search page?
>
> Also, I don't understand the problem described in the second paragraph
> above. I.e., you seem to believe that the Expires and Cache-Control headers
> are limited in "scope" to requests with the same cookie. But I think this is
> not true. The cookie mechanism is independent from the cache control stuff.
> So you should be able to just send the cookies always, and then do whatever
> the headers tell you do about caching when you get the response. If you
> request the same URL with different cookies, and the result was previously
> (correctly) cached, then you should be able to just use it. If that's wrong
> then it's not your fault, it's the HTTP server's.
>

Some relevant links....

HTTP Vary header<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44>
Caching in HTTP
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html>
I think the Vary header is what you should pay attention to, at least "in
theory".

-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.voiceglue.org/pipermail/voiceglue/attachments/20090217/b1cdc770/attachment.html 


More information about the Voiceglue mailing list