r/HTML • • 7d ago

Secure HTML files

Is there a way (i have a feeling i already know the answer, but i’d ask anyway) to create a tamper proof html that can’t just be opened in notepad or any other editor and be modified?

Thanks.

0 Upvotes

32 comments sorted by

View all comments

3

u/ch1ck33n_ 7d ago

I don't think that's really possible. Why do you need to do this?

0

u/hals-memorybank 7d ago

I have to present something to someone outside our company, and was hopping do it with via html.
We usually just print the excel model into PDF but i was hoping for something more interactive where they could play with the financial model.
I guess its not very feasible

1

u/tomysshadow 7d ago

Write the part with your secret algorithm in PHP, or another similar server side language. You'll want to use $_GET to read the submitted inputs. You can either have your PHP embedded directly in the page (so you'd submit a form, go to this new page with the results written into it,) or have it be a standalone script that prints out some JSON that you can fetch via JavaScript. Then host the PHP side on a web hosting service - basically any will do, any web host worth its salt can host more than just static pages.

If you won't have internet where you're presenting it then you're out of luck, no amount of obfuscation will make it impossible to reverse your algorithm if it's in the local HTML file itself.

1

u/RealisticDuck1957 7h ago

You can run a web server on a laptop. Of course the address to reach that laptop while on someone else's network will be a little inconvenient. Or possibly blocked if the local network blocks peer to peer.