Removing content from source code


I have JavaScript running on my site to remove certain content from the inspect panel but I also want to have it removed from the source code as it should only be visible to certain users depending on their logged in status (using Memberstack for members). Is there a way to do this?

I can’t share the read only link due to confidential material. I could potentially share the link privately if needed.


If you want to dynamically control what content and code is displayed to a user, based on some application state then you need to run your site on an application server where the code is dynamically generated. WordPress would be a common alternative. I use a variety of CMS systems where this is a non issue.

Hiding content or deleting DOM nodes based on client side JavaScript can easily be circumvented.

I would be happy to discuss alternatives if that is a requirement for your project.

Highly recommend that you talk to Jeff about setting this up properly. If you’re looking for content security, you either need to load the content in after the user has been authenticated, or you need to gate it effectively at the server side.

On Webflow hosted sites, custom gating requirements can be achieved using a reverse proxy, but the end result rather like having a deadbolted front door but an unlocked basement window. Someone determined enough can still gain access.

Jeff can help you figure out what type of solution will work best for your use case.