Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
How to hide linked JavaScript file in HTML

I am a beginner and I am learning. Now I am working with API. In some cases, I have to use my private API keys in the JavaScript file. If I publish the webpage somewhere anyone can see the private API keys by clicking on view page source on the browser.

I always write JavaScript codes in a separate file and link them with the HTML file by the script tag.

Is there any way to hide the JavaScript file or is there any way to prevent the leaking of private API keys?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

All the code you put in JavaScript is available to public. In the common case you need to create kind of middle-server, which proxies your request to api-server with your private credentials.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!