I'm creating an asp.net web application in c# and have hit a slight problem when viewing a page on the iPhone 4 and 5 (not sure about other mobiles as I've had no reports from other mobile users).
When viewing the page on a desktop browser it all works as it should. What happens is that the user enters their email address in a text box and click a button. I have some Javascript JQuery on the button that calls a web method via ajax, the web method returns an list of IDs and Names in json - the button then populates a drop down box on the web page with this information.
The user can add information to the database via a different part of the site which when they click the above button the list that is returned should be larger and include the new information. However I've noticed on the iphone 5 that when I've gone back to the page the ajax call doesn't seem to have taken place (it briefly shows a popup when it happens) and the drop down box doesn't contain the new information in the database. I believe it's simply displaying information from the phones CACHE.
If I go into the safari settings and delete cookies & data / web data, then go to the webpage, voila all the drop down is populated and the ajax call works (please wait popup shows). I have tried adding the below line of code to my master page on page_load, but it's not worked.
Response.Cache.SetNoStore();
Is there anything else I need to do? As I say, the site works for desktop browsers, and I'm not a mobile developer (I don't even use mobiles for web browsing) so not sure what the problem is or how I can fix it in my code.
Many thanks for any help/advice.