How to hide your JavaScript code from View Source

How to hide your JavaScript code

If you don't take precautions with your JavaScript code, you're making life easy for anyone who wants to clone it. But if your programming processes are more than one click away, attackers will prefer to clone a competitor's software. Bots and other miscreants combing the internet for AWS or Azure credentials usually do not bother with obfuscated code – the next website's login information can also be used to mine bitcoin and can be harvested with less effort.

Obfuscating JavaScript used to be complex. However, the process has become significantly easier during the last few years. Today, even small companies can and should protect their code from prying eyes. In some cases, getting secure is just an invocation of a Node.js package away.

www.generateconf.com 

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

Tam Hanna is a software consultant who specialises in the management of carrier and device manufacturer relationships, mobile application distribution and development, design and prototyping of process computers and sensors. He was a regular contributor to Web Designer magazine in previous years, and now occupies his time as the owner of Tamoggemon Software and Computer Software.

Latest in Javascript
Speed up JavaScript
21 steps to super speedy JavaScript
Angular 8
What's inside Angular 8?
brain.js neural network
Use brain.js to build a neural network
Explore data visualisation with p5.js
Explore data visualisation with p5.js
WebGL 3D
Create a WebGL 3D landing page
JavaScript code splitting
All you need to know about JavaScript code splitting
Latest in How to
Ivan Mironenko ZBrush character tutorial
Craft a game-ready character asset using ZBrush and Substance 3D Painter
Maya 3D abstract strands tutorial
How to easily create complex and abstract animation using Maya
Whiskytree battle damage effects tutorial
Create gnarly battle damage for vehicles using a mix of Maya and Nuke
After Effects lightning tutorial
How to use Adobe After Effects to create a lightning effect the easy way
Venusaur art
How to paint Pokémon's Venusaur in Photoshop
Babiru DaVinci Resolve colour tips; a red creature in armour, it has a large toothy grin, in the background is a cyberpunk style city
How to achieve a bold cinematic look in animation, using DaVinci Resolve and Fusion Studio