0

I am new to Angular 4. I am working on an application which uses Angular 4 and Spring in the backend. One of the functionality in the application is to update the records from the UI. Problem in when i update the data ( it is basically the checkboxes which are to be checked/unchecked) , data is being saved successfully in databases. But when i navigate back to the same screen to view the updated field, it shows me old data ( even if i uncheck a few checkboxes) When we do debugging it shows that , data is being returned from the cache.

We tried different approaches like adding headers and adding no cache parameter but it did not help.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
user3534483
  • 2,133
  • 5
  • 22
  • 19
  • One way to prevent that is to add an additional parameter to your request to make it unique: `http://path/of/my/request?time=123456`, give it the current time with `Date.now();` – Ploppy Jun 15 '18 at 13:17
  • Tried this approach, even this is not working – user3534483 Jun 18 '18 at 09:40
  • Can you show us HTTP headers of stale data request and response? Note that BFCache may be involved. See [Make the bfcache in Internet Explorer work like Firefox](https://stackoverflow.com/questions/7825579/make-the-bfcache-in-internet-explorer-work-like-firefox) discussion on StackOverflow – Leonid Vasilev Jun 19 '18 at 14:16

0 Answers0