Why CDN files matter in an app
On a website, loading jQuery, Bootstrap or a font from a CDN is normal. In an app, it is a dependency on the network: open the app in airplane mode and the page renders unstyled or not at all. An APK built from HTML already carries your files, so the fix is simple — carry these too.
What to bundle and what to leave
- Bundle: frameworks and libraries, CSS frameworks, icon fonts, web fonts, images your layout needs.
- Leave: analytics (it fails silently offline), embedded maps and videos (they need the network anyway — show a placeholder), and your own API.
How to bundle a library
- Open the CDN URL in your browser and save the file to
vendor/in your project. - Change the tag to
vendor/filename.js— relative, no leading slash. - For CSS that references fonts or images by relative URL (Bootstrap Icons, Font Awesome), download the whole package so those relative files exist.
Then check the result with the ZIP structure checker and read building an offline HTML app.
Questions people ask
Does my APK need the internet if I use a CDN?
For those files, yes. Bundle them in the ZIP and the app works offline.
Is it allowed to bundle a library from a CDN?
Open-source libraries such as jQuery, Bootstrap and Chart.js are licensed for redistribution; keep their licence comment in the file. Fonts from Google Fonts are open-licensed too.