Skip to content

Replace XMLHttpRequest with fetch to hook on cache #23

@Tewr

Description

@Tewr

The following code mirrors an old version of the blazor assembly loader

return new Promise((resolve, reject) => {

The "new" (3.2.0?) version of blazor uses resource caching with fetch (service worker?), this should be mirrored in BlazorWorker to take advantage of request caching, has the potential to speed up worker initialization down to 0 requests for most cases.

not sure if practically feasable to hook on to the cache used here: https://github.com/dotnet/aspnetcore/blob/7a9707eb98c9e82d2fdbc25de541bf60d4bb46ca/src/Components/Web.JS/src/Platform/WebAssemblyResourceLoader.ts#L77 but certainly worth an investigation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions