Please tell me what does /glow.min.js?v=5 means How this is used? i.e How the versioning is done here as file is one.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
It means to grab
glow.min.jsfrom the root of the server, with a simplistic attempt to control caching via a query string.The query string does nothing unless the server is set up to handle it, which typically it isn’t and so the server just throws away the query string. This is sometimes done to control caching, the theory being that if the resource is delivered with HTTP 1.1 (because HTTP 1.0 resources with query strings aren’t cached), the browser is allowed to reuse the resource if the query string matches, but if you change it to
v=6, then the browser is expected to re-fetch the resource (presumably you’ve changed the underlying file).There are better ways to manage caching than query strings. This article gives a good account of what that code is doing and alternatives for doing it other ways. Some select points made in the article:
Cache-Control: max-ageheader with a large value.max-ageor expiration time.But read the article for much more insight.
That last point, “if a resource changes, change its name” should be particularly easy in your case, since I assume you’re referencing the BBC’s Glow library which will already have a version you could use in the main URL (rather than in the query string).
I’ll just add my own point: