How To Password Protect a page or post in blogger

How To Password Protect a page or post in blogger








Password protected page is useful when you want to share somethings to the specific people or members. However, unlike Weebly and Wordpress, Blogger does not have password protected page feature integrated into its system. This might be one of the downsides of using Blogger but thanks to its flexibility we are able to have the Password protected page by applying some simple tricks on our blog.

Different with password protected page, content encryption uses javascript to lock your content into special characters. This make it hidden from others and only people with "key" can unlock it to see what's inside. Instead of creating a lot of password protected pages for different particular users, we shall make use of content encryption to hide specific content from public. In combination of password protection and content encryption, you can then have 2-steps protection for your Blogger Static Page.



You might wonder why not use only the content encryption for secure the page, this is to keep the page away from irrelevant people. By using only the content encryption, others may still able to access the page although they cannot see the content.

Example

I've created an example for you, please go to here, the page password is tbtlab.
Basically the idea in this example is that I want to grant access to relevant personnel to the page. All relevant personnel can then view the general information at the page. However, there are 3 hidden sections which are restricted and only can be view by User A, B and C with their respective particular KEY.

Create Password Protected Page In Blogger

The following steps will teach you on how to make your Blogger Static Page protected by the password defined by yourselves. Note that even your page is password protected does not mean your page content is encrypted. We'll talk about content encryption right after this.

  • Go to Blogger Dashboard > Pages > New Page.
create blogger page

  • Create your page content, and place the following code on top of your content. Remember to change the "tbtlab" to the password you prefered, and also change "http://www.error_page_url.com" to the URL for redirection if wrong password is entered, it can be your home page or another static page.

<SCRIPT LANGUAGE="JavaScript">
var password = 'tbtlab'
password=prompt('This is password protected page, please enter password to continue.','');
if (password != 'tbtlab') {
location.href='http://www.error_page_url.com';
}
</SCRIPT>

  • Save & Publish your page. View your page to see if it is working, you should have seen a prompt message box asking for password.

Comments

Popular posts from this blog

IMPORTANT: This (PACS/DICOM) blog will provide you necessary tools and study materials. For access pay for a coffee INR 499/- only. #PACS #DICOM

How to make bootable pendrive wth the help of cmd/soft.

CCNA