Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 627761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:33:48+00:00 2026-05-13T19:33:48+00:00

I recently read on Meta about some browser not flushing their cache even after

  • 0

I recently read on Meta about some browser not flushing their cache even after reading a script url of this form

myscript.js?v=1234

so to go around the problem i am thinking about implementing a solution i also read but without any details given to it. something like myscript-1234.js and reroute to the actual correct file, but i have a doubt now.
Should i rewrite that url to myscript.js or to myscript.js?v=1234 ? I am actually confused as to how it even going to make a difference to have a rewriting.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:33:48+00:00Added an answer on May 13, 2026 at 7:33 pm

    Your rewriting should not redirect to any other URL (which would the be fetched by the browser), but should be “internal” on your server.

    What I mean is that when receiving a request for “myscript-1234.js“, your server should instead serve the content of the myscript.js file ; which will always be the last version.

    In the end :

    • For the client the is a different URL each time you update the file on the server : myscript-1234.js, myscript-1235.js, myscript-1236.js, …
      • This is why the browser will try to re-fetch the file from the server : as it’s not the same name, it will not have the file in cache
    • But, for the server, there is always one and only one file : myscript.js
    • And you’re using some “rewrite” rule so thr server just removes the -XYZ portion of the file name before trying to read it from disk.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently read an article about password hashing . How are MD5 or SHA1
I recently read a post online about rotating text with css. This appealed to
I recently read an article about c#-5 and new & nice asynchronous programming features
I recently read a post about no longer needing to declare ivars as well
I recently read about labelled statments in java and the ability to specify a
I recently read that in StringWriter and StringReader are used for writing and reading
I just recently read about Mocking objects for unit testing and currently I'm having
I am new in flex and recently read about Validation and Invalidation in components
I recently read a jQuery tutorial about best practices. I usually run all my
I recently read an article talking about the Java annotations, and on this latter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.