Reputation: 186
I'm developing a chatbot, with which I'm sending Hero Cards with images saved in an Azure Blob storage. I previously had a test image so use, but now I have newly designed ones to send. But the chat keeps sending the older version.
This only happens on messenger, since I've tested in the Bot Framework Emulator and it works fine (see attached).
Is there someplace where I should go and clean the cache or something to solve this?
New: http://weghobot.blob.core.windows.net/images/HouseCleaning.PNG
Upvotes: 2
Views: 531
Reputation: 1577
What you can do is append a variable (cache-buster) with a random value each time on your image URL like the following:
string imageURL = "http://weghobot.blob.core.windows.net/images/HouseCleaning.PNG";
string imageURLWithCacheBuster = imageURL+ "?v=" +DateTime.Now.Ticks;
The random number makes every image call look unique and therefore Messenger will not find the cached item and will re-fetch your image every time.
Upvotes: 2