Polymer Service Worker Not Caching And Maybe Not Fetching

20 views
Skip to first unread message

Darin Hensley

unread,
Apr 9, 2016, 1:22:31 PM4/9/16
to Polymer
I have this custom element which fetches the facebook profile pic(very small size) with url. I am using a service worker to intercept the call out and cache it. However, it does not seem to effective. The call out goes out over network with every page refresh. In addition, there is nothing in dev tools under local storage. I also tried cacheOnly and it still called out to the network for the url, so I know that the service worker platinum-sw-fetch is not effective.

Any suggestions on what I am doing wrong? If it did work, shouldn't I see something in local storage for dev tools? I do see the service worker itself in dev tools though.

<platinum-sw-register auto-register
                     
clients-claim
                     
skip-waiting
                     
base-uri="../bower_components/platinum-sw/bootstrap">
 
<platinum-sw-fetch
   
origin="https://z-1-scontent.xx.fbcdn.net"
   
path="/hprofile(.*)"
   
handler="cacheFirst">
 
</platinum-sw-fetch>
</platinum-sw-register>

Darin Hensley

unread,
Apr 9, 2016, 1:44:46 PM4/9/16
to Polymer
Please disregard.... I realized this can not be done because of cross domain...even with the origin attribute. 
Reply all
Reply to author
Forward
0 new messages