Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda