UI scripts in JS includes are not refreshed with the page. UI scripts loaded in Service Portal are cached; therefore, users are running outdated code until the browser cache is cleared or a hard refresh is performed. This issue is not just limited to loading JS includes via a theme but also when loading from a widget dependency.
Steps to Reproduce
- Create a new UI Script with one line, for example, alert("Refresh 1");.
- Create a new JS Includes for the UI Script.
- Add the JS Include to the Stock Service Portal theme used by the default /sp portal.
- Load a page, for example, /sp?id=calc.
- Modify the UI script to alert("Refresh 2") and save it.
- Refresh the portal page.
Note that the alert still displays Refresh 1 and not Refresh 2 even after making the UI script change.
Go to /cache.do to clear the browser's cache.
Related Problem: PRB1190755