Streaming live at 10am (PST)

Customcode to always ask for password for protected site

#1

Read-Only: https://preview.webflow.com/preview/brunner-schmidt?utm_source=brunner-schmidt&preview=b2f70be52667cae8c3643d02a0efceb9

Live-Site: https://www.brunner-schmidt.de/

Hi!
So on my site I have a protected page, which use is for our own technicians to download documents they might need when on custom location.
It might happen that said technicians have to acccess the protected page on a customers computer.
Therefore I would really like it if you ahd to enter the password everytime you want to access the site, not just after restarting the browser.

I am by no means a web designer, I dont know html or js, I mostly do this as a hobby and only for a few months on and off. Please dont judge me too harshly when my suggestions dont make any sense.
My idea was to include a custom code on the protected page that instantly deletes the “wf_auth_page”-cookie, which then force the user to enter the password once he wants to reaccess the page (for example by reloading).

Is that even possible? Or is there another way?

Thanks for your help, highly appreciate it!

#2

You want each page refresh to set the password again?..(Y/N)

For hosting a files with password use google drive or dropdown (Why start adding custom code to webflow?)

I never try this.

#3

It a normal site, with just one password protected page. Once you enter said page with the password, you can access it without the password until you restart your browser. That is what I am not happy with. I want people to have to enter the password every time they want access to the protected page, even when just refreshing it.

Google drive or dropbox (I guess thats what you wanted to type) is no option for me. The files are on our own FTP server.

I have tried exactly that (https://stackoverflow.com/questions/2144386/how-to-delete-a-cookie) without success. Tho I might have done something wrong when implementing the code into webflow. Do I just have to put it in the body of the protected page as follows:

I have some basic knowledge in C++, but none in HTML, JS or similiar, unfortunatly.