Nariman
Nariman

Reputation: 13

WebClient download weird behavior

It seems that i have this weird behavior in my Web Client My application goes in this scenario:
1-user browse topics and it's replies (Loaded from the web using URL & DownloadStringAsync)
2-he add a reply in the topic
3- I re-load the replies of the comment again from the web

But the new added reply don't appear on the new downloaded result although it appears when viewing the URL on the Web , The reply appears only if the application is closes and re-opened.

I want to view the reply in the page as soon the user post it

Upvotes: 0

Views: 310

Answers (1)

mharr
mharr

Reputation: 604

WebClient caches urls (and responses) on Windows Phone.* You could:

  • send a different url each time. Add a phony search item on the url like ?phonyid=1 and increment it each time.
  • Specify on your url page on server to not allow the browser to cache.

*my first reference for this behavior is Timdam's blog entry at http://goo.gl/nqs27, but I've also seen this happen in practice.

Upvotes: 1

Related Questions