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

100
Vistas
Local HTML+Local JSON security

I have an application that generates a JSON file. It is to be consumed by a local HTML/JS file. My experience and Google/Stack Overflow seem to indicate the following:

  • This is easy when wrapping this into a JavaScript assignment and just use <script src>. This works just fine.
  • For security reasons, we can not read JSON directly from a local file (e.g. using require, or d3.json, using Chrome).

I don't understand the difference between these two methods w.r.t. security. I would have expected both to work, or neither. Am I missing something really obvious?

Tentative answer: <script src> checks for valid JS, while other fetch like operations would read anything?

about 4 years ago · Juan Pablo Isaza
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