Skip to content

WebNinjaDeveloper.com

Programming Tutorials




Menu
  • Home
  • Youtube Channel
  • Official Blog
  • Nearby Places Finder
  • Direction Route Finder
  • Distance & Time Calculator
Menu

Node.js StatiCrypt Example to Encrypt & Protect Static HTML Page With Password in Browser Using Javascript

Posted on November 24, 2022

 

 

Welcome folks today in this blog post we will be looking how can be password protect a static html page in browser using staticrypt.js library in node.js and javascript. All the full source code of the application is shown below.

 

 

Get Started

 

 

In order to get started you need to install the below node.js dependency using the npm command as shown below

 

 

npm i staticrypt

 

 

And after that you can add the password to any html page using the below command

 

 

staticrypt index.html password

 

 

If you wanna do it practically the command gif is shown below

 

 

 

 

 

As you can see in the above gif it created the encrypted version of the index.html page and now if I open that page inside the browser I will see a password prompt where I need to enter the password which I set earlier i.e. johnwilliamson

 

 

 

 

Online Tool to Generate Password Protected HTML Page

 

 

You can even go to this tool here where you can copy paste the raw html that you need to password protect inside the textarea and also you need to provide the password as well and then it will generate the file for you. Just download the encrypted html file and you will see the same password protected popup dialog as shown below

 

https://robinmoisson.github.io/staticrypt/

 

 

 

 

 

 

GITHUB REPO

Recent Posts

  • Angular 14/15 JWT Login & Registration Auth System in Node.js & Express Using MongoDB in Browser
  • Build a JWT Login & Registration Auth System in Node.js & Express Using MongoDB in Browser
  • React-Admin Example to Create CRUD REST API Using JSON-Server Library in Browser Using Javascript
  • Javascript Papaparse Example to Parse CSV Files and Export to JSON File and Download it as Attachment
  • Javascript Select2.js Example to Display Single & Multi-Select Dropdown & Fetch Remote Data Using Ajax in Dropdown
  • Angular
  • Bunjs
  • C#
  • Deno
  • django
  • Electronjs
  • java
  • javascript
  • Koajs
  • kotlin
  • Laravel
  • meteorjs
  • Nestjs
  • Nextjs
  • Nodejs
  • PHP
  • Python
  • React
  • ReactNative
  • Svelte
  • Tutorials
  • Vuejs




©2023 WebNinjaDeveloper.com | Design: Newspaperly WordPress Theme