Mobile Web app global properties

You must Login before you can answer or comment on any questions.

I want to ask about how can i clear my app properties when i launch my mobile web app again i.e next time after closing last time. I dont know why but it is showing me different username in my login but the information according to that username and id is not fetched correctly. If its the problem that iam moving the username property from one window to another using Ti.App.Properties.setString() or something else.

2 Answers

For Titanium Mobile Web, Ti.App.Properties are stored in the browser's local storage. It's Mobile Web specific, but you could just access local storage directly and remove all the properties in one shot:

if (Ti.Platform.osname == 'mobileweb') {
    localStorage.removeItem('ti:properties');
}

Your Answer

Think you can help? Login to answer this question!