PHP + HTML
Upload the avatar will overwrite the original avatar, due to the cache reason, only ctrl+f5 refresh will show otherwise will always show the old avatar
, how can you solve the problem?
Reply content:
PHP + HTML
Upload the avatar will overwrite the original avatar, due to the cache reason, only ctrl+f5 refresh will show otherwise will always show the old avatar
, how can you solve the problem?
It's best to modify the avatar URL after the avatar changes.
If you want the URL to be the same, remember to take it with you when ?r=xxx
you request it, and remember that it is xxx
randomly generated by the server or client each time.
Another approach, such as Facebook, uses a fixed URL for a user's avatar, but when actually accessing the URL, it generates a 302 jump to the real image address, which guarantees that each avatar is different.