0

I crete a web service in php and which returns JSON. It works fine but it seems to be cache results I changed values in the table and the service doesn't reflect this change. I included the following code but it doesn't seem to work. in my browser I am still getting the old values. How can this be rectified?

header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
Kern Elliott
  • 1,659
  • 5
  • 41
  • 65

1 Answers1

0

You may want to check your Ajax library (client) documentation see if you can disable its caching mechanism.

If you wish to disable cache on server side, refer to "How to control web page caching, across all browsers?"

Community
  • 1
  • 1
  • I have tried these methods and they still don't work if I do a direct query on the database it works but not the web-service – Kern Elliott Jun 02 '13 at 00:24