420
Views
4
Comments
Caching issue with Resources
Question

Note: This issue is for an on-prem implementation of OutSystems.

Hi all!


Over the past few weeks we've been having problems with project files in Data\Resources and Interface\Scripts not updating when deploying. These are html, js, and css files loaded through an iframe or straight onto the page through script integration.

At first we thought it might be some sort of localized caching issue in the browser, but clearing cache and even trying on a fresh laptop did not solve the issue.
Next we examined the settings in IIS, but dev env was not cached and has no load balancer present. Further examination showed that the files are actually getting uploaded to OutSystems and that they are in fact the latest version. The files just don't make their way to the client's browser.
Although the request headers being no-cache, the response headers contain cache-control: max-age=2592000. Not sure what the impact is here, but thought I would mention it.

The next step of our troubleshooting journey took us to url caching. For this, I implemented a timestamp url parameter on all the calls to the files specified (emulating what OutSystems does on its own for regular css and js integration) and dynamically changed the name parameter of the iframe. This did not solve our issue and was honestly to be expected, as the Interface\Scripts also do not update when published.

The last thing I tried, hoping this was somehow related to iframe content or url caching, was generating the iframe dynamically. This was more of a desperate move than anything else, since clearly even loading the Data\Resources directly did not solve the issue. Instead of having the iframe in the web block, I execute a js to create it after the page is ready. This did not solve the problem either (again, as expected).

We have asked our infrastructure guys, our internal OutSystems coaches, and other development teams. We have looked for client side causes and server side causes. I have gone through every OutSystems forum post I could find on the subject and l have looked for other possible solutions on StackOverflow and other sites. Unless we really missed something obvious, all that is left to do is to as the community. So here goes...


Anyone else having similar caching issues?


Have a nice day!

Andreas

2021-07-07 13-36-32
Hans Dollen

Hi Andreas,

so summarized, everything is working fine on dev and test, but not on production having a loadbalancer. 

If that's the case, I would first test the application using a direct connection to the production frontend server (and if there are multiple front end servers, test each of them directly.). Than, you'll know if there is a problem with the outsystems server, or that the loadbalancer is caching and not refreshing stuff.
Sometimes you need to configure your IIS, sometimes the loadbalancer needs to be configured and sometimes both needs to be changed. It's a long time ago I had such a problems, so I don't know the details anymore (Which headers needs to be add or removed).
Regards, Hans

UserImage.jpg
Andreas Goulimis

Hi Hans,

Thank you for the feedback, sadly the problem is not in production (because we're still in development). I will however send out fresh requests to infrastructure for a config check to be able to add that information here.


Kind regards,

Andreas

2025-08-22 10-19-44
Pramod Jain
 
MVP

Hi Andreas,

I get into such issue few months back with one of my customer and because the infrastructure is managed by them it was hard to do the troubleshooting but the issue solved finally and the cause of it was they were using some Http caching on the CDN (using Akamai Server ) and the caching was actually happening there for the static contents and js files.

They then cleared the cache on Akamai server and things start working for them. Not sure about your case but though to give you some background if it can add some value in your investigation.


Regards,

-PJ-

UserImage.jpg
Andreas Goulimis

All right, so... I apparently am an idiot...

Adding the timestamps to the URLs and name attribute of the iframe did indeed work.

It turns with all the experimenting my base url ended up referring to the original version of the implemented module. This is now fixed.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.