Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear cache and add user-agent on webview2 changelog request #550

Merged
merged 1 commit into from
Jul 13, 2022
Merged

Conversation

ptdev
Copy link
Contributor

@ptdev ptdev commented Jul 10, 2022

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.

When using webview2, changelog requests can get cached by the webview2 instance and not show 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.
This also makes webview2 use whatever user-agent was set for the HttpUserAgent variable (useful for display logic if you wish to reuse the same changelog on your website and also inside the updater webiew2)
@ravibpatel ravibpatel merged commit be24152 into ravibpatel:master Jul 13, 2022
tech8023 pushed a commit to tech8023/AutoUpdater.NET that referenced this pull request Aug 10, 2022
tech8023 added a commit to tech8023/AutoUpdater.NET that referenced this pull request Aug 10, 2022
tech8023 added a commit to tech8023/AutoUpdater.NET that referenced this pull request Aug 10, 2022
tech8023 added a commit to tech8023/AutoUpdater.NET that referenced this pull request Aug 26, 2022
tech8023 added a commit to tech8023/AutoUpdater.NET that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants