The Issue:
There is a website that is built in ASP.net. That website then builds a URL that takes us to our Angular App. Both the ASP.net and Angular App are under the same domain (i.e., example.com) but different sub-domains.
Our Angular App then takes us to another website and that website takes us back to our Angular App.
Once we land back on our Angular App, we see a glimpse of the previous page the User was on, within our Angular App, before our App redirected them to the other website in the 2nd step above.
After seeing a glimpse of the previous page, the new page becomes visible. The duration of which the previous page is shown to the User only lasts for a second or less.
Additionally, there is also another website that is built as an Angular App. When this website builds a URL that takes us to our Angular App, we have zero problems. This caching/flickering issue only happens when starting on the ASP.net site (which is under the same domain). Server-side caching is disabled in the Nginx config for our Angular App (I am unsure about the ASP.net app).
FYI:
It is tough trying to fix this issue as the ASP.net website redirects us to the QA environment for our Angular app. And, we can’t just push any code into QA. We are unable to use a local running application or docker container URL for testing. Therefore, I am looking for any advice/potential strong solutions as researching this problem has been a complete pain.
I am unsure if this is truly a caching issue (it sure seems that way). I am just not sure how else to explain the issue.
What I Have Tried:
Chrome and Edge are affected by this issue. I have been unable to test Safari or Firefox as I do not have those browsers on my work machine (and cannot install them as of this time).
I have been unable to reproduce this issue locally. I tried running the other website that is also built as an Angular app locally, along with our main Angular app thinking that both applications being on the same domain was a root cause. While I haven’t rolled that out as a potential issue, I was unable to reproduce the issue locally.
I have also compared cookies and session items to both scenarios when traversing to our App and nothing is different there (everything looks completely normal).
Server-side caching is disabled at least on our Angular App (again, unsure about the ASP.net app as of this time).
I have also tried clearing the Browser Cache for Images and Files. That did not resolve the issue. I can't clear the entire cache (like cookies or session storage) or else we won't be able to use our Angular App at all.
Our Angular App is running Angular 15. We first noticed this issue when we were on Angular 13 (we moved from 13 to 15). After upgrading to Angular 15, the issue is still apparent.