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

196
Vistas
set header Access-Control-Allow-Origin in plain html

I know this can be done through PHP ... languages.

But,
here is the scenario:
I load html files in specific "div" in "current.html" file by following function:

$("#dv_sample").load("https://sifr.in/sample_page.html",function(){
    //do my work here ...
});

This works fine.

I want to use this same function and load "https://sifr.in/sample_page.html" into div, on another (my own)website,
So,
I want to set CORS, only on this "https://sifr.in/sample_page.html" file.

I have to set following header in "sample_page.html" (.html is important) Access-Control-Allow-Origin: *

How do I set it?
(without PHP or any other language).

I have tried setting below line in sample_page.html:
<meta http-equiv="Access-Control-Allow-Origin" content="*">

But it doesn't work.

Can JavaScript be useful?

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