Custom Welcome Dashboard not updating
s
[SOLVED] Just enable "Disable cache" in network tab in DevTools when developing locally. --- Original post --- Hi I have created a cusotm dashboard following this tutorial for Umbraco 13: https://docs.umbraco.com/umbraco-cms/tutorials/creating-a-custom-dashboard However when i make changes to WelcomeDashboard.html it is not visible. I have seen the notice about Smidge and Runtime minification settings, but whatever I do it still shows old content. https://cdn.discordapp.com/attachments/1228316983683186748/1228316983871672412/image.png?ex=662b9a55&is=66192555&hm=c0255f3f0baf80e7973f5d11c3532447ba51effb47ac17969489e73c63119197&
h
It is most likely a caching issue, what I normally try to resolve this is opening the dashboard url directly
s
It seems to be related to Chrome / Brave caching, when I try to open it in Safari it works
How can you open the dashboard url locally?
h
just point your browser at it's html file WEBSITEURL/App_Plugins/customwelcomedashboard/welcomedashboard.html that normally sorts it for me
once you've done that it normally works ok in the backoffice
s
Well but that has no styling and no js
a
You should be able to access
/App_Plugins/CustomWelcomeDashboard/WelcomeDashboard.html
in your browser.
Bah - the last replies only loaded just now when i replied 😊
Accessing the view directly in the browser will only be the view, and no styling and JavaScript. That is expected. But you can access it and click CTRL + F5 in your browser to clear the cache. Anyways. In Chrome Dev Tools you'd generally want to have the Disable cache (when DevTools is open) option enabled. I'm not sure if that is exactly the same as the Disable cache in your screenshot. https://cdn.discordapp.com/attachments/1228316983683186748/1228322873249234994/image.png?ex=662b9fd2&is=66192ad2&hm=3550e7a0439a57b261ea1eed0c2cb2ccfa103b8c84c2f2c874dce3ad0b06c889&
There are also a number of ways to do cache busting. In you declare your dashboard in the
package.manifest
file, you can add something like
?v=1
to the URL, and then increment the number when you make changes. This is unfortunately a manual step, but it will also ensure that client's browsers will see it as a new file. If you declare the dashboard in C# instead, you can handle this dynamically. E.g. as I'm doing for Skybrud redirects here: https://github.com/skybrud/Skybrud.Umbraco.Redirects/blob/v13/main/src/Skybrud.Umbraco.Redirects/Dashboards/RedirectsDashboard.cs#L16 It then calculates a cache buster value based on the Umbraco version and the package version, among other things.
48 Views