Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

azure ad b2c - How to reset ADB2C custom policy custom HTML cache?

I have a custom ADB2C policy that specifies <ContentDefinition> tags to use custom HTML. The custom HTML is stored in Azure Blob Storage.

The problem I have is that when I upload a new version of the custom HTML the changes don't show up when I go through the policy (unless I leave it overnight). I suspect that there might be some caching going on, but none of the documentation I have seen mentions caching.

Is there a way to disable/clear the cache, or might there be something else wrong that has similar symptoms?

The new files are definitely in the blob storage as I can request them directly in a browser and get the latest versions.

I can also upload the new html files with new names and tweak the policy to point to the new names, so I'm fairly confident I'm not making a silly configuration mistake.

question from:https://stackoverflow.com/questions/65830096/how-to-reset-adb2c-custom-policy-custom-html-cache

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

AAD B2C does not cache or download your HTML file. AAD B2C drops JS to tell the client to download the HTML, then client side JS that AAD B2C delivered, will have the client merge the HTML file with the content on the page. The problem here is to do with the client browser caching the HTML file. You can prove this by using Incognito/Private mode usually.

You can see more info here on how this process works: https://docs.microsoft.com/en-us/azure/active-directory-b2c/customize-ui-with-html?pivots=b2c-custom-policy#custom-html-and-css-overview


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...