Call reload button programatically

Occasional Contributor

I'm creating a tab app on Teams.

I need to refresh contents but calling location.reload() does not work.

Is there any way to call reload tab button on right upper side programatically?


10 Replies

@Taco888 - Currently teams does not provide reload tab button pragmatically. Could you please build your own reload within the tab.


Thanks for your reply.

But when I call location.reload(), it gave me an error like:


Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure resource ''. This request has been blocked; the content must be served over HTTPS.


* is actually our domain.


I don't know why https is replaced to http.


Is there any way to reload the page?


@Taco888  - Could you please try to use location.reload after initializing Microsoft teams. Could you please try this code

<! DOCTYPE html>



    <input type="button" name="Button" value="Click" onclick="onClick()">

    <script type="text/javascript">


        function onClick() {








Thanks. I tried as you recommended but it did not work.

The same error was shown.


And when I tried to call parent window method like:

it gave me 
Uncaught (in promise) DOMException: Blocked a frame with origin "" from accessing a cross-origin frame.

@Taco888 - Are you able to reload the page locally?



When I open Dev tool and enter "location.reload()" on the console pane, it works.

And if the page is loaded on browser other than Teams, it works programatically.

But the same thing does not work on Teams programatically.


@Taco888 - Which package are you using for teams?



I'm using microsoft/teams 1.5.2.


@Taco888 - Could you please share your app manifest zip file? That helps us to reproduce the issue.

Hi There, 

Is there anything concluded on this thread as I am facing the same issue?