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

316
Views
When does Android Chrome re-fetch a JavaScript file on a cached web page?

I'm developing a web app and having a weird issue where my testers' browsers are fetching newer JavaScript files but using cached HTML files.

My scripts have query parameters, which I updated when I push a new HTML file, to ensure the browser isn't using older cached code:

<script src="code.js?version=1></script>

When I update code.js, I also increment the version parameter in the script tag on page.html.

My testers are hitting errors on Chrome on Android. When Chrome is reopened from the background after I push a new version of both files, apparently Chrome fetches the new code.js but uses the cached page.html.

This is problematic when the new JavaScript references newly added HTML elements that don't exist in the cached version of page.html.

Under what circumstances would the browser re-fetch a JavaScript file when, as far as it knows, the HTML page itself hasn't been changed? The HTML file is still pointing to the old version query string, so shouldn't that exact path still exist in the cache?


I've since migrated to using RewriteMod to let me inject version numbers into filenames, but I'd still like to understand why files with query strings aren't being retrieved from the cache when the query string hasn't changed.

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!