Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Why is my UIB Portal loading cached pages?

WORKFLOW-COWBOY
ServiceNow Employee
ServiceNow Employee
I have a portal for ordering items, but when I go back to the item it has a cached version of the page with the fields already filled out with the last submission. Why is it caching? How can I prevent this?
 

--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow
1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I know this is old, but I did find a hacky workaround for this that works pretty well in portal experiences. The crux of it is that when a required parameter changes the page automatically refreshes. So if you're routing to a page and want to get a new version you can pass that page a different parameter and you'll get a fresh copy of the page. The easiest way to make sure you're passing something unique is just to use a timestamp. 

It's hacky, but it works.

It also sorta works for workspaces, but instead of refreshing an existing tab if opens a new tab with the new required parameter so you end up with multiple tabs of the same page, which may or may not be an issue.

I would also note that I've only gotten this to work with required params rather than optional.

View solution in original post

7 REPLIES 7

Kevin Schaub
Tera Contributor

Did you ever find a solution? Running into the same thing

Nope.. I gave up. 


--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I know this is old, but I did find a hacky workaround for this that works pretty well in portal experiences. The crux of it is that when a required parameter changes the page automatically refreshes. So if you're routing to a page and want to get a new version you can pass that page a different parameter and you'll get a fresh copy of the page. The easiest way to make sure you're passing something unique is just to use a timestamp. 

It's hacky, but it works.

It also sorta works for workspaces, but instead of refreshing an existing tab if opens a new tab with the new required parameter so you end up with multiple tabs of the same page, which may or may not be an issue.

I would also note that I've only gotten this to work with required params rather than optional.