html - How to prevent loading image from cache when the src is a redirect url to the actual image file -
all:
when try solve problem when load image cache, got answers post:how force web browser not cache images
it talks add timestamp src
<img src="picture.jpg?1222259157.415" alt=""> but in case, not direct image url, avatar url github like:
<img src="https://avatars.githubusercontent.com/u/614?v=3" alt=""> when add timestamp 79399.92599998368 it, becomes:
<img src="https://avatars.githubusercontent.com/u/614?v=379399.92599998368" alt=""> i wonder why src can still correctly recognized , image url changed? tell me why works , how browser deal this?
thanks
a question mark (?) in url separates location , query string, listing arguments.
in case, github ignores arguments , serves image identified location part. in other words, github looks @ first part , serves same content, user's browser cannot predict this, needs load content if whole url doesn't fit cached one.
Comments
Post a Comment