开发者

Flash caches a JSON response when we never want it to

We have a game built in Actionscript 3, but for some users when they load the game it's loading the cached version of their saved game (JSON string) instead of getting the latest one from the server. We've implemented a random string at the end of the request URL, and I've also added headers for pragma and cache-control to the request. I'm not sure if adding those headers will make开发者_如何学C a difference though.

Is there anything else we can do to fix this? Will adding those headers help? Is there any documentation about how different browsers would handle this?

It's not a problem we can test so we're pretty much stabbing in the dark until users stop emailing us about it.

Thanks!


Adding the random query-string has always worked for me. Perhaps you could try and use a debug proxy to see what's going on behind the scenes. I swear by Charles, but I also hear good things about Fiddler.


Two things you could try:

  • Use POST request
  • Add a random string (unix time stamp or something similar) at the end of you URL that is totally ignored by your server: foo/bar.json?foo=bar&dc=1315486845135
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜