Traditionally, the URL of the file to which there is a link is added to some unique value in the query, for example, script.js?1337 . The request format does not matter, as web servers ignore it for files.
It should be noted that in most cases it is redundant. HTTP provides many options for configuring caching. Usually, a request for a static file always leaves, but the client (the browser that is) can report that the file has already been cached and indicate the version (date, label). If the file is not updated on the server, the server will give an empty response, telling the client to use the cached version. If the file is updated, the server will send a new file.
Unfortunately, there are all sorts of stupid caching proxies, crookedly configured browsers and other very smart software that interferes with the normal functioning of HTTP according to the standard. Therefore, such crutches are necessary.
<script type="text/javascript" src="myScript.js?v=1.2"></script>- Igor