Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Ionic icons are not getting cached in PWA #165

Closed
ratikanta131 opened this issue May 12, 2017 · 2 comments
Closed

Ionic icons are not getting cached in PWA #165

ratikanta131 opened this issue May 12, 2017 · 2 comments

Comments

@ratikanta131
Copy link

I am trying to do a PWA, when I run the app offline, the back ionic icon is not visible properly. The button is actually a back button but it is showing just a box. forum post

@mhartington
Copy link
Member

This is just an issue with them not being in the cache

self.toolbox.precache(
  [
    './build/main.js',
    './build/main.css',
    './build/polyfills.js',
    'index.html',
    'manifest.json',
    'assets/fonts/ionicons.eot',
    'assets/fonts/ionicons.scss',
    'assets/fonts/ionicons.svg'                
    'assets/fonts/ionicons.ttf',                
    'assets/fonts/ionicons.woff',               
    'assets/fonts/ionicons.woff2,              
  ]
);

Adding the fonts to the cache array will make sure they get cached upon request.

@ratikanta131
Copy link
Author

Thanks @mhartington, The following code worked for me.

self.toolbox.precache(
[
'./build/main.js',
'./build/main.css',
'./build/polyfills.js',
'index.html',
'manifest.json',
'/assets/fonts/ionicons.eot',
'/assets/fonts/ionicons.scss',
'/assets/fonts/ionicons.svg',
'/assets/fonts/ionicons.ttf',
'/assets/fonts/ionicons.woff',
'/assets/fonts/ionicons.woff2'
]
);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants