What is the meaning of adding (?1297280570) to the image names?

Sometimes i find images on the sites added through css. Even if image name is (let’s say) footer_logo.gif. In css it will be added as footer_logo.gif?1297280570

What do I miss in here?

Regards,

Answer

The chances are that it’s a cachebuster – used to ensure that the url is unique (typically a random number or a time stamp) and that the image is therefore forced to be reloaded. It might be used where images are generated by the server on the fly, as an alternative to using a different actual image name every time (which has knock on implications), this mechanism just ensures that the image is always reloaded.

See this page describing more info about cachebusters

I would imagine this number is almost certainly a timestamp, as it’s encoding a date this year in unix time – the number of seconds since Jan 1 1970. Converting your number into a date, you get Wed Feb 09 2011 19:42:50 GMT+0000 which would be the last time that image was generated.

Of course it’s not necessarily anything to do with the image or css. The question mark simply denotes that what is about to follow are some parameters passed in the url to the web server, which can be used for whatever is relevant on the website:

See https://stackoverflow.com/questions/574493/what-is-the-symbol-in-url-used-for-in-php

Attribution
Source : Link , Question Author : user385917 , Answer Author : Community

Leave a Comment