Message from JavaScript discussions

March 2019

— Basically


Login. html n Admin. html

this is my page

On Admin.html if user press F5 button, then it should be redirect to Login. html

how i can achive this ?

— <meta http-equiv="Refresh" content="0; url=/Login.html" />

— Oh wait, nvm

— I misread

— document.addEventListener('keydown', e => {
if (e.key !== 'F5') return;
location.href = '/Login.html';
return false;

Message permanent page

— Thk

— Keep in mind that anything on the frontend is not security

— People will still be able to access Admin.html

— => used for?

— Or user click on refresh icon on browser

— Function definition