dimanche 23 février 2020

Can browsers be forced to cache HTML pages?

I'm getting married and instead of printing wedding invitation cards, I made a webpage. One of my friends created a subfolder (/var/www/web/myname) on his web server, and I uploaded my files (HTML, CSS, JS) via SSH.

Since it's public anybody is able to see it, but I don't want that. That's why I AES encrypted the HTML code of my page and I made a login page. After entering the a valid password (its hash is stored in JS source file) the JS script decrypts the AES encrypted string (that is also stored in the JS source file) by using the password as the key and it changes the actual page to the now-decrypted HTML code by calling document.open(), document.write(), and document.close().

Is there any way to force the browser to cache the actual HTML code to avoid re-typing the password each time they open the page?

I know it's a silly thing, please don't judge me. :)




Aucun commentaire:

Enregistrer un commentaire