Quick Tip: Refreshing/Reload Custom Pages after an Update

In the last blog I’ve written about how to make Custom Pages. When you develop more complex Custom Pages you probably have to make changes to the page and play the app to check if it’s working accordingly. But then I’ve got only notifications telling me to refresh to app, but wasn’t able to tame the cache. It was driving me crazy, until I’ve found a workaround.

Maybe this will get better with the time. It’s a preview after all.

Steps to update a Page

1. In your solution navigate to the Pages, open your page and make the changes

2. Save the page

When saving, take care that the progress spinner is shown, otherwise it won’t save anything. For instance, it seems to me that the changes in the properties area (right) are considered only when the input control lost focus (on blur).

3. Publish the page

4. Publish the app

In case the model-driven app is not opened, navigate in the solution to the app, and publish it.

5. Refresh the app

After the notification about successful saving, you need to open the app (or refresh the browser) to see the changes in your app.

But usually I’ve got only a notification about the changed app, instead of the changed app.

“A new version of the app is available. Please refresh to update!”

Sometimes it’s enough to refresh the browser (F5) and you get to see the new version playing, but sometimes the app is very stubborn, and keeps showing the old version. Strangely, the app knows about the newer version since the notification keeps showing.

Maybe I get this more often because I work with all three browser tabs opened ( page, solution for app publishing, app itself). If you’re not that patient (I wasn’t) and keep refreshing, I pressed even 20 times on browser refresh (F5): nothing happened. Sometimes it helps to stay put, and press F5 only after a while. But overall, I was losing too much time waiting to see the updated version.

After a while I was frustrated enough to try to force the refresh. And I’ve found out that when I open the DevTools (F12) and navigate to Application, open the IndexedDB, locate the last “PowerApps” database, right click on “webplayer” and click on “Clear” , the app is showing the latest Custom Page version. I only need a browser refresh (F5) after that.

After that the data for the IndexedDB will be emptied, but it gets filled again with the time. I didn’t saw any side effects until now.

Maybe it doesn’t make sense, maybe it happens just by hazard, but since I do that it worked every single time.

I know, it’s brute force. I wish there were a better way. Maybe this will be fixed soon. Or maybe you don’t struggle like I did. But in case you get annoyed waiting and refreshing, you know now how to forcefully tame the page cache.

Photo by Mohamed Almari from Pexels

One thought on “Quick Tip: Refreshing/Reload Custom Pages after an Update

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: