-1

I am developing a Extjs 5.0 desktop web application. In first page i am storeing text value in singleton class using config methods and In the second page i am displaying same singleton class values using get methods. this works fine.

But if the user clicks browser refresh button on the second page all singleton values are resetting to null. how to solve this issue. How to handle browser refresh button, I have to have use the singleton class to store the values.

Thanks.

CharanRoot
  • 6,181
  • 2
  • 27
  • 45

1 Answers1

0

The issue is that JavaScript is client side so it has to get made when the page is loaded. The safest solution to your problem would be to store using a backend like PHP. You could put it in a database or in a regular file.

If using a backend isn't possible/desirable then your only solution is to use cookies/localStorage. Both are limited and both are volatile (if the user deletes their cookies the data is gone). Also neither of those solutions are secure if that is a concern for you.

Kyle
  • 403
  • 2
  • 10