0

I have a get request on my server that my app makes a call to, and I had to add an extra property for it to return. I go to the url directly and the new property shows up fine, but when testing on the app in a browser with ionic serve the Chrome dev console shows the request comes back without the new property.

I tried using angular $http.get() and jQuery $.ajax() and both have the same outcome. This happens when testing the app in browser and when testing on an android device, but not when going to the url directly in a browser.

chrispytoes
  • 1,281
  • 1
  • 12
  • 33
  • Have you desactivated the cache on server ? – e666 Sep 15 '16 at 18:57
  • @e666 Thanks, I just tried adding the header `res.header('Cache-Control', 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0');` to the response on the server but it has no effect. – chrispytoes Sep 15 '16 at 19:19
  • Please see this question http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers/2068407#2068407 There is other headers – e666 Sep 15 '16 at 19:21
  • @e666 Just tried adding `res.header('Pragma', 'no-cache');` and `res.header('Expires', '0');` but still not working, is that all? – chrispytoes Sep 15 '16 at 20:11

0 Answers0