-3

Nowadays In most of the sites i am seeing url like this

http://example.com/style.css?v=024741259dd2

Where style.css is appended with some text. What is this appended text is it some version number or date and time? If yes how is it generated? What is the significance of this?

AlBlue
  • 22,017
  • 14
  • 65
  • 90
karthick
  • 11,550
  • 5
  • 52
  • 83

1 Answers1

3

it is probably a "random" number (e.g. a file checksum, or the SHA of a commit under a versioning system, or the resource timestamp in MD5 format, or...) generated automatically on server-side as a cachebusting technique. The purpose is to invalidate the browser cache for that resource if you've already loaded it and a change was made.

As example, I always use that technique while I am developing a website with Jekyll and Jekyll-assets, so I can be sure to always see my recent changes without reloading my javascript and stylesheets file from the cache.

Fabrizio Calderan
  • 115,126
  • 25
  • 163
  • 167