On 17 jan, 10:17, Gabor Szokoli <[email protected]> wrote: > Hi, > > GWT has sheltered us from browser- and javascript intricacies so far > so well, my questions are probably laughably clueless, so just point > me to the relevant literature: > > We use simple HTTPRequests to get JSON data from the same origin. (not > GWT-RPC) > The browser is supposed to adhere to cache retention directives > supplied by the server in the response, which is great 99% of the > time, but then there's always the odd 1%... > Can my GWT application invalidate elements/subtrees of this cache > programatically? Think of an in-application "refresh" button, which > does not reload the GWT client or disturb application state.
The theory says that you should be able to add a "Cache-Control: no- cache" to your *request*. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 That's the theory, I haven't ever tested it... There's also the conditional-GETs way, using If-Modified-Since, If- None-Match and similar request headers. Again, that's the theory; your server should be prepared to served such conditional requests in an optimized way (or they wouldn't have much added value apart from transfering less bits on the wire; server processing load is IMO equally important) and I don't know what browsers do when you use these headers with a GWT RequestBuilder... > On a related note, how is the usage of HEAD requests controlled? Do > browsers use it at all? Can I give hints (either from client or server > side) when to use HEAD to verify cache validity? Why would you use HEAD to "verify cache validity"? I don't think browsers use it at all by their own, but you should be able to use it if you like (with RequestBuilder). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
