Hacker News new | past | comments | ask | show | jobs | submit | spurlock's comments login

> Say you are building a site that will make use of very heavy JS code, to the point that the code is critical to your business and you do not want it copied or stolen. How do you protect it? Can you protect it?

There are countless obfuscation tools out there, but in the end if someone wants your code, they can reverse it into more readable code and steal it, using it on their website/webapp. It's the way browser engines are designed that ensures this. JavaScript is there for the taking and is not compiled into machine code. It's interpreted. So no, you can't protect it. No matter how much you abuse the eval() function or mangle the code[1]

[1]: https://en.wikipedia.org/wiki/JSFuck



Yep, that's the one. I hope it works out, building something is a lot less stressful knowing you already have your first 5/25/100 customers.


"Okay Google, infer semantic meaning from my words"


> there are just way too many walled gardens between the various parties that hold the data necessary to implement any of the above.

This is changing. If Google had their way, they would be assigning IPV6 addresses to bits of dust lying around in your house and trying to assign semantic meaning to them. If they had their way.


I like to use Otherside to create different lists on different topics[1]. You just pick the person most likely to be following a certain niche of users, and Otherside creates a private list for you. You can make the list public and share it with others if you want.

[1]: https://otherside.site


For a start, don't overthink this. There's a wealth of tools[1] you can use that have all the functionality you're looking for baked in. If you're concerned about copying others work, don't be. Everyone does it. Why re-invent the wheel? Just be careful copying things like images and copy, as you will have to be original there[2]. There's actually not much skill required for this stuff, and this is why basic coding skills should be taught in school, because there's little 'grit' to this. Make something bold, do this: <strong>bold</strong>. Not so hard. The hard part is doing this at scale and this is why you need to simply accept that coding sites is a lot of repetition.

So to answer your question - I started by calmly accepting that as a developer, I would be typing out a lot of the same bits of code over and over, often creating <table> soup in the early days, and have since moved onto <div> soup and then styling accordingly with CSS. Sadly there is this trend of designing sites in reverse and people doing all the CSS and JavaScript first, and only when they're ready they start adding actual content.

[1]: https://adventurega.me/bootstrap/

[2]: http://bettermotherfuckingwebsite.com


Both bettermotherfuckingwebsite and motherfuckingwebsite have seriously brightened my day, thank you for that :)

>>Sadly there is this trend of designing sites in reverse and people doing all the CSS and JavaScript first, and only when they're ready they start adding actual content.

So, I find this to be really true. Maybe because it's easier to present a code solution to a design problem than it is to present a design solution to an extrinsic problem? But, this is exactly the problem I want to solve. I want to watch a screen cast of a designer solving a design problem the same way I can watch a screen cast of Ryan Bates solving a Rails problem.


It's for educational purposes only. You are right - Nobody should use this for hiding secrets! This is why I enjoy crypto done purely on the frontend, preferably with JS and no leakage to third parties.


I've never seen this happen to a comment before. (Thanks for reposting the links). Did it get downvoted to death or something? I'm not seeing any negative points on it though


In the meantime, just use bukk.it for memes:

https://bukk.it



Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: