I'm new to web programming. I'm working on PhoneGap android app. In that create a page from that i moving to many pages by swiping right side.
Problem: Suppose if i moved to nth page from that if i press home button, i need to clear inbetween page history and home page should get to shown.
How to do that using html or JS?
EDIT:
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
e.preventDefault();
navigator.app.exitApp();
}, true);
}