I'm using localStorage to back up form data on a long form. So if a user refreshes they will not lose everything. This is working perfectly on Chrome & Firebox on the computer.
However on mobile (iOS at least) It's not working at all. Any advice?
Here is a small part of my code as an example:
Storing Data:
window.onbeforeunload = function() {
window.localStorage.setItem("Job1", $("#topScore1B").text());
}
Retrieving Data:
window.onload = function() {
// If values are not blank, restore them to the fields
var name = window.localStorage.getItem('Job1');
if (name !== null) $('#job1').text(name);
}