Disabling Browser Back Button

Hi All,

I have developed a PWA and now I need to disable the browser's back button. Please suggest me some solutions.

Thanks in advance.

Regards,
Hema

Hi Hemalatha Paramasivan,

Try using Javascript to do it .

function preventBack() { window.history.forward(); }  

    setTimeout("preventBack()", 0);  

    window.onunload = function () { null };

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.