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

146
Views
reload local jsonp file as variable in website

I have a local webpage that loads a large json database file by having a file called data.jsonp containing data={json dictionary of stuff}, then importing said file in my HTML with <script src="data.jsonp"></script> to load data as a variable containing the whole database, which works.

I now need to be able to change the content of the data.jsonp file and have the data variable update without refresing the whole website. I can edit data.jsonp, but how do I apply this change to the data variable?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Add another <script> tag to the DOM, and it will reload the script:

let script = document.createElement("script");
script.src = "data.jsonp";
document.head.appendChild(script);
about 4 years ago · Juan Pablo Isaza Report
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!