Sunday, October 14, 2012

[android-developers] Re: Does Android cache http-requested data?

Keith Wiley schrieb:

> I am quite flummoxed. I am aware that Android is requesting and
> receiving a GZipInputStream, and I can see the input stream's type in
> the debugger, but that seems irrelevant to my issue.

Caching of web server chains can be very elaborate. See
for example here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
14.9 Cache-Control

So eventually setUseCache() to false can help, but might
slowdown your requests.

It could be also an issue on the server side, that for example
the server emits a wrong "Expires" header, this header is also
described in the above RFC.

If you re-access the same file multiple times and if you
can remember the modified date, then the setIfModifiedDate()
comes very handy. If the data on the server doesn't have a
newer modified date, you will get:

HTTP_NOT_MODIFIED = 304;

Bye

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate