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

199
Visualizações
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 à 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