Our app uses the Asp.NET Core & Angular version 6.6.1 .NET Core 2.2 version. I recently made a few small changes to the login screen and then did a production build of the Angular app to deploy the changes. I have received some clients are unable to login now unless they clear their cache in the browser. It seems to be mainly Safari on either iPhones or iPad users more than anything but I am guessing it must be a similar issue on other browsers.
Is there anyway I can combat this issue besides telling clients to clear their cache? I thought "ng build --prod" created unique hashes so it would handle cache busting. But it doesn't seem to be happening.
Any suggestions would be greatly appreciated.
7 Answer(s)
-
0
This seems to be an angular cli problem. https://github.com/angular/angular-cli/issues/10641
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I did see that. But after looking further it does seem ng build --prod is changing some of the files hashes. There are so many files I missed some of the changes and now I can see it did do some changes. Is there any other way that anyone knows of to force a cache clear on the browser?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Try
window.location.reload(true).Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Wouldn't that just put me into a reload loop?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
When would you force a cache clear on the browser? Not every time you load the page, right?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I would want to figure out a good way to only do it on the first page load just after a new build only.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
@joe704la
Please follow this issue. https://github.com/angular/angular-cli/issues/10641
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)