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

158
Views
clear browsing cache - basic html css js website

I've created a simple HTML, SASS, JS website and each time im uploading new files, to actually see the changes appear on the website I need to clear my browsing data.

is there anyway to address it via vanilla js headers, or a button on the website to clear cache?

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

0

You can create a button that deletes the cache for that page like this :

<button>Clear cache </button>
let btn = document.querySelector("button");
btn.addEventListener("click",()=>{
    window.location.reload(true);  
    window.location.reload();  // few browsers don't require for a parameter to be passed

})

To know more about window.location.reload(true)

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!