MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
282 stars 503 forks source link

Reload caché in Microsoft Teams Tab #11181

Open Wajeed-msft opened 3 months ago

Wajeed-msft commented 3 months ago

Copied bug from: https://github.com/OfficeDev/teams-toolkit/issues/11913

Details from original post: Describe the bug In MS Teams for Windows I am trying to refresh my Tab (which loads an html page). From the server I am sending the following headers:

Cache-Control: no-cache, no-store, must-revalidate
Expires: 0
Pragma: no-cache

But still, the page within the Teams Tab is not updated. Currently the only possible way I have found is by deleting this directory: %appdata%/../Local/Packages/MSTeams_8wekyb3d8bbwe/LocalCache

But it is a very complex solution for users.

Is there any other option to reload the cache? Any header, for example? Since that's how it should work.

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

microsoft-github-policy-service[bot] commented 3 months ago

Hi Wajeed-msft! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Nivedipa-MSFT commented 3 months ago

@Hector-Mina-98 - Thanks for reporting your issue. We are checking this with engineering team, we will inform you once we get any updates on it.

Nivedipa-MSFT commented 2 months ago

@Hector-Mina-98 - We got an update from enginnering team saying that you need to return the correct Cache-Control headers (i.e. no-cache, no-store, must-revalidate) and make sure you don't have a service worker registered (which can also handle caching of the app's HTML pages). For existing users who got the app's HTML page(s) cached before the correct Cache-Control headers were put in place, clearing the Teams app data might be the only possible fix. You could also try leveraging the Clear-Site-Data header in case that works for them: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#clearing_an_already-stored_cache