Clear cache and add user-agent on webview2 changelog request #550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR with 2 line addition that I believe should be merged or at least considered:
When using webview2, changelog requests can get cached by the webview2 instance profile and not load the latest changes on the update window. This can usually be handled by proper expiration header usage on the webserver side but I figure that it's a safer bet to always clear the cache before loading the changelog as that may not always be possible and is dependent on many external network factors. (alternatively, maybe add a new boolean setting for this?)
This also makes webview2 use whatever user-agent was set for the HttpUserAgent variable when loading the changelog and not just when requesting the update XML file. (Useful for website display logic when you wish to reuse the same changelog on your website and also inside the updater webiew2. For example, hiding extra menus/content when requesting from updater)
Cheers.