Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda