I've created a PWA (Progressive Web Application) that uses an object tag to load an file called icon.svg for display. I've added icon.svg to the cache. App successfully installs on device (Android phone). However, when I shut down internet connection on device and launch the app, the SVG does not display. When the connection is on, the SVG displays just fine. I've also added logging to the service worker's fetch event to see if a request for icon.svg is being made. It is not (I verified this by changing the object tag's data attribute to a different filename and no request gets logged). Does object not issue a fetch that can be intercepted? I know I can resolve the issue by putting SVG inline or creating a CustomElement, etc. So workarounds are not what I'm concerned with. I'd like to understand if this is just a peculiar (but intended) behavior that someone else has come across.
PWA, SVG, and the <object> element
85 Views Asked by Fernando Sanchez At
1
There are 1 best solutions below
Related Questions in SVG
- inline SVG text (js)
- JavaScript svg scale issue with matter.js
- Accessing displayed hyphens of an HTML element with JavaScript
- How to colorize the 'x' in a cancel svg icon
- SvgPicture asset does not work and shows "Try connecting the name to one that is defined, or defining the name" error
- How do I set the color of the icon for my Moodle plugin of Activity type (mod) to match the color used by the theme?
- Nothing is shown when running a d3 sample code
- How can I prevent a line break at an SVG icon?
- why my css marquee wont work after an XML request on all my pages
- Eventlistener not working when mouse entering ID within svg file
- Clip image inside of enclosed letters
- How to set image in axis text in SVGGraph?
- Manipulating SVG Elements and Properties with UI
- SVG export from Adobe Illustrator generates strange code
- SVG is not picking up font
Related Questions in PROGRESSIVE-WEB-APPS
- Stopwatch loosing time in a browser using blazor and web assembly when browser put in background
- Can Angular minify, compress and remove unused JS and CSS files on build?
- Badge Not Displayed on iOS PWA Despite Receiving Push Notifications
- Why is it impossible to definitively know if your website is running as a PWA or as a website?
- Venia pwa + magento 2 categories and products issue
- Problem when executing the bubblewrap build command
- Is there a configurable way to batch workbox-background-sync requests in vite-pwa plugin
- Is it possible to make my web app work both server-side only and client-side only?
- Specifications on Google Chrome's Cache Management and Portability Across Devices
- Failed to load resource: the server responded with a status of 404 () index12312.js
- Middleware redirecting creates an errors. PWA app, NextJS 14, App router
- Data path "" must NOT have additional properties(ngswConfigPath)
- PWA configured with vite-plugin-pwa errors - manifest not found
- IOS pwa start_url doesn't dynamically changes
- Angular build for subfolder
Related Questions in SERVICE-WORKER
- Chrome extension MV3: persistent service worker die after wake up from hibernation
- How to intercept a request made by a form submit in JavaScript?
- How to update my service worker for existing web push subscribers?
- How to intercept all network requests in a web page
- Specifications on Google Chrome's Cache Management and Portability Across Devices
- How can I get the WindowClient id of the current window?
- Using Firebase cloud messaging service worker with env in react js
- Firebase Cloud Messaging not showing notification in browser
- Offline PWA as a ChromOS Kiosk Application
- In Service Workers, is it possible to get a more meaningful error than "TypeError: Failed to fetch"?
- Why is TBT on PSI so different from my local machine?
- Serving service worker file in src in Vite dev mode
- I met the "Service Worker" response after scraping a web by python.But I want to get the right web response
- The Service Worker does not shut down
- How problematic is the exposure of Firebase configuration data when using web push?
Related Questions in FETCH-API
- Simple movie API request not showing up in the console log
- Hooks are not supported inside an async component error in nextjs project using useQuery
- Why array find returns nothing? using context and params
- When sanitize/encode while implementing tags system like on SO
- Is it fine from the viewpoint of the security to set always `{ credentials: "include", }` in Fetch API of JavaScript?
- How to address timeout issue on fetch function
- Receive AJAX Form data in Server side
- How do I post new data directly into a nested array in my json data file?
- Is there a way to use a user input variable into a specific parameter in an fetch API function?
- How to disable cached responses from node fetch? (Microsoft Bookings API)
- Missing render HTML element for login requests from client to server
- CORS issue with using fetch ,No 'Access-Control-Allow-Origin' header is present on the requested resource
- How to simulate a file upload during tests?
- Dilemma and strategy for handling big JSON file in React app
- How to store fetch headers in javacript from website I don't own?
Related Questions in SERVICE-WORKER-EVENTS
- Prevent ServiceWorker from caching content found on outside domains
- Is it possible to multiple service workers run at the same time and handle different or same event types?
- Is there a way to intercept the request made by an iframe's src attribute?
- PWA notification how to redirect to installed app if it exists
- getting "Property 'data' does not exist on type 'Event'" on a PushEvent
- Is it possible to prevent a service worker from loading a cached version of the app and hit the server instead?
- PWA: Registration event listeners don't get triggered
- Chrome extension Background.js script not start after sleep mode
- how to register Service Worker in a different folder other than public folder
- PWA, SVG, and the <object> element
- Angular Service Worker: Where to add EventListener?
- Notify a web page served from service-worker cache that it has been served from SW cache
- Fetch event never gets triggered in Chrome extension service worker. Is this expected?
- Firefox service worker stops CSS images from showing if using JavaScript redirect
- [Service Worker]: How to retry post request if api call fail due to server down?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Library Affected. workbox-sw
Browser & Platform. all browsers.
Issue or Feature Request Description: Is there a way to cache SVG files used as object element data source?
What I want is a working offline interactive SVG (having javascript inside a script node of it's own.