Updates to UI scripts are not being reflected. The browser is using a cached version of the UI script.


Description

Symptoms


Updates to UI scripts used as JS includes in the Service Portal are not reflected in the client. This may cause client side JS errors when dependent scripts (i.e. catalog client scripts) make calls to new resources included in the updated UI script. 

This issue could also happen outside of Service Portal, where changes made to UI scripts are not being reflected. 

Release


All current support versions.

Cause


The browser is using a cached version of the UI script. This happens because the downloaded script is named after the UI script (i.e. uiScriptName.jsdbx) which doesn't typically change with updates.

Resolution


Force Chrome to use the updated version by giving the UI script a unique name. This can be done by appending the date or version number to the name (i.e. uiScriptName_013018a):