I have a client web application that allow users to LOCK the screen without the need to log out from the application, this action just hides the elements on the screen and show a lock screen.
Obviously, when I inspecting the elements on the page I still can see the elements on the page and their data.
What is the best solution to hide the elements from the inspect html? storing the html on javascript parameters and removing the html from the page will be a good solution for this problem? I’m just thinking of it and it seem that their is not a secured solution to hide data in html
If your lock is for security reasons then it’s better to implement a server-side lock and move the user to another page (saving the page state and restoring it afterwards). Messing with the markup using JS is more complicated and everyone can fool your logic by disabling or executing some inline JS with a debug tool.