# Wednesday, 09 September 2009

Here's an important thing to take note of when making RIA applications. Wheter it's Flash, Silverlight or just plain AJAX. If you need to make a call through the browser's for data, always append a random query string parameter to it so the browser will never return to you a cached response! For example suppose your code calls this URL for data.

http://www.myapp.com/mypage.aspx?id=myid

After the first call to the page, it's likely that the browser might just cache the results and give you the same data for any following calls. Therefore you need to insert a random factor into the url like this.

http://www.myapp.com/mypage.aspx?id=myid&rnd={5656-234-3435}

It DOESN'T MATTER WHAT IT IS, it could be a number, current tickcount, guid, as long as it makes the browser think that it needs to hit the server and get a new page.

On the flip side, if you know your page will be hit via client side calls, it's a good idea to disable caching in the response headers.


Note that you can Post As GUEST as well.
blog comments powered by Disqus