is there any way to prevent this ?
Stop clicking the browser back arrow....
The browser will go back to the history (page) from which it came from... Default behavior... It MAY be outside your control, since the browser received the event click, and not your app... Of course, I was wrong once before - once... (ok, twice...)
While development in debug mode, I often click the refresh page of the browser to load my latest corrections.
Seems to me, there is some way to prevent the user - and trapping the back key - from going back (ie. before saving the data - for example) - but I may be confused with B4A and B4J.... since I work heavily in both....