CMP-9545: Cache Storage API extra check for protocol #5516
Merged
eymar merged 2 commits intoJetBrains:masterfrom Jan 20, 2026
Merged
CMP-9545: Cache Storage API extra check for protocol #5516eymar merged 2 commits intoJetBrains:masterfrom
eymar merged 2 commits intoJetBrains:masterfrom
Conversation
eymar
reviewed
Jan 20, 2026
|
|
||
| suspend fun load(path: String, onNoCacheHit: suspend (path: String) -> Response): Response { | ||
| if (!supportsCacheApi) return onNoCacheHit(path) | ||
| if (!supportsCacheApi) { |
Member
There was a problem hiding this comment.
Hello! The change at this line seems to be unrelated to the fix. Could you please revert it here? This helps us when we use git history / git blame.
Member
|
hey @Maxi937 ! I noticed that you closed the PR. Do you plan to re-open it? |
Contributor
Author
|
Apologies @eymar, I reverted wrong so just nuked back to the original and added back my changes.
|
eymar
pushed a commit
that referenced
this pull request
Jan 20, 2026
Compose Multiplatform v1.10.0 introduced the use of the Cache Storage API to avoid repeat http requests for resources on Web ([#5379](#5379)). In a VsCode Extension Environment, the protocol of a Web View Panel that gets used is "vscode-webview:". This does not work with the Cache Storage API and results in an error when trying to load any compose resources. This PR just ensures the protocol is http/https in order to use Cache Storage API on Web Target. Fixes https://youtrack.jetbrains.com/issue/CMP-9545/ComposeResources-on-Web-not-loading-because-Cache-Storage-API-is-not-supported-everywhere ## Testing **Describe how you tested your changes (provide a snippet or/and steps)** - I ran my vscode extension with the change and without the change **without** <img width="1658" height="753" alt="image" src="https://github.com/user-attachments/assets/367f5a41-4b0b-4262-9d38-3baca1ce0125" /> **with** <img width="1658" height="885" alt="image" src="https://github.com/user-attachments/assets/b06415df-1388-45c2-a439-21e604fc2e54" /> - I ran a regular browserDevelopmentRun to ensure caching still worked as expected <img width="1863" height="942" alt="image" src="https://github.com/user-attachments/assets/54e7dd47-084c-4514-b79b-32f35577dc92" /> ## Release Notes ### Fixes - Resources Fixes an issue where web resources failed to load when calling the Cache Storage API with unsupported protocols (e.g., vscode-webview: in VS Code webviews). (cherry picked from commit 89f6aea)
siarb
added a commit
that referenced
this pull request
Jan 20, 2026
Cherry pick from #5516 Fixes https://youtrack.jetbrains.com/issue/CMP-9545/ComposeResources-on-Web-not-loading-because-Cache-Storage-API-is-not-supported-everywhere ## Testing This should be tested by QA ## Release Notes ### Fixes - Resources Fixes an issue where web resources failed to load when calling the Cache Storage API with unsupported protocols (e.g., vscode-webview: in VS Code webviews).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Compose Multiplatform v1.10.0 introduced the use of the Cache Storage API to avoid repeat http requests for resources on Web (#5379).
In a VsCode Extension Environment, the protocol of a Web View Panel that gets used is "vscode-webview:". This does not work with the Cache Storage API and results in an error when trying to load any compose resources. This PR just ensures the protocol is http/https in order to use Cache Storage API on Web Target.
Fixes https://youtrack.jetbrains.com/issue/CMP-9545/ComposeResources-on-Web-not-loading-because-Cache-Storage-API-is-not-supported-everywhere
Testing
Describe how you tested your changes (provide a snippet or/and steps)
without

with

Release Notes
Fixes - Resources
Fixes an issue where web resources failed to load when calling the Cache Storage API with unsupported protocols (e.g., vscode-webview: in VS Code webviews).