I have a select menu which is populated by a rest service.
When I test the app in the browser for the 1st time, everything is working ok.
But when I test it again, without clearing browser cache, then the select menu is not populated, presumably because the page load event is not triggered.
The same happens when I test native on a smartphone. 1st time ok, next time the menu is not populated.
I could use pageshow event, but the problem with this is that the pageshow event is also triggered when you use the back button (from the next page for example) and land on the page, then the select menu is repopulated with calls to the rest service. In case of back button, when using pageload event, the browser doesn't repopulate the menu, but it is also not empty, the select menu contains the values from the initial rest call.
So how can I combine this behaviour? I want the selectmenu to be repopulated when the app is started, but not when using the back button, then he should use cached items.