Mangling
Rename variables and functions to opaque ids (e.g. _0x4a2f). Simplest technique.
Hex string encoding + console stripping · harder to read in the browser
The Security module in Insight does the same in every audit: TLS, headers, cookies and exposure — with a score breakdown and a remediation plan.
Obfuscation makes code harder to read, but it does not protect secrets or access credentials. Determined tooling can reverse most obfuscation — think door lock, not military cipher.
Sensible uses: business-logic friction (pricing, coupons), scraping friction. API keys still belong on the server.
Bad uses: hiding malware, dodging ad blockers, or hiding trackers from users.
Rename variables and functions to opaque ids (e.g. _0x4a2f). Simplest technique.
Strings as \x6a\x61\x6e (hex) or Base64 so literals are less obvious.
Inject never-run code to grow size and muddy control flow.
Turn if/while into switch + state table. Can slow execution.