Nita
Nita

Reputation: 561

JS / jQUERY - To make variable which contains API key invisible in the JS code

Is it possible to hide api key variable in JS code, hide it somehow or or encrypt it in the source code? Thanks.

Upvotes: 0

Views: 88

Answers (1)

Luke Joshua Park
Luke Joshua Park

Reputation: 9795

Nope.

Javascript code is client-side. Client-side means out of your control.

You can obfuscate, encode, encrypt as much as you want, but the browser will always have access to this information if it is used client-side.

Upvotes: 3

Related Questions