[SOLVED] Is it possible to execute a request only one time?

Hi, I’m developing an app where the index.html contains some cards that needs to be populated from a request. I’d like to do that request only 1 time. Only after executed the login. After the user is logged can move itself from the other pages of the app and also came back to the index without that each time is executed the request.
I’m usually use pageInit function, but in this case is not useful.

Thank you for any help.

After your request successful, create one variable on local storage check before executing your request.

localStorage provides an interface to a permanent Storage interface. It allows one to save data as key-value pairs.

https://javascript.info/localstorage

1 Like

so, It doesn’t exist a specific event. Thank you for the help, I’ll write the code following your suggestion.