gilbarbara / react-inlinesvg

An SVG loader component for ReactJS

Home Page:https://codesandbox.io/s/github/gilbarbara/react-inlinesvg/tree/main/demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CacheProvider causes SVG loading to fail in private Firefox windows

Fabilin opened this issue · comments

Describe the bug

When opening an app that uses InlineSVG's CacheProvider in a Firefox private browsing window, SVG loading throws an error titled "This operation is insecure". This seems to be caused by ServiceWorker-related operations getting denied.

Your minimal, reproducible example

https://codesandbox.io/s/serverless-dream-36kds6

Steps to reproduce

  1. Open Firefox in private browsing mode
  2. Try to load a cached InlineSVG
  3. Fail

Expected behavior

Global caching should probably be force-disabled when service worker APIs are unavailable.

How often does this bug happen?

Every time

Screenshots or Videos

image

Platform

  • Browser: Firefox (119.0b8)

react-inlinesvg version

4.0.5

TypeScript version

4.8.4

Build tool

No response

Additional context

No response

Hey @Fabilin

Fixed in 4.0.6
Thanks