Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

198
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!