# Using the Cache Api with only a web worker

**URL:** <https://forum.kirupa.com/t/using-the-cache-api-with-only-a-web-worker/640979>\
**Category:** web dev\
**Created:** [November 1, 2019, 5:10pm UTC](https://forum.kirupa.com/t/using-the-cache-api-with-only-a-web-worker/640979 "2019-11-01T17:10:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bstagy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bstagy/32/7351_2.png) [@bstagy](https://forum.kirupa.com/u/bstagy)\
**Post date:** [November 1, 2019, 5:10pm UTC](https://forum.kirupa.com/t/using-the-cache-api-with-only-a-web-worker/640979/1 "2019-11-01T17:10:00Z")

</div>

Hi,  
I’m new to PWA’s and am working on my first one. I’m at the point where decisions have to be made on storage. I understand to use a service worker in say, Heroku, you have to have an SSL certificate. And to have an SSL in my host, they require a static Ip. These things cost monthly. I’m currently not working, and would like to avoid these costs, but yet have the offline functionality of a PWA.  
Has anyone ever tried using a web worker to write to the Cache API to save static files? Not images, etc, but just the shell.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [November 4, 2019, 11:22pm UTC](https://forum.kirupa.com/t/using-the-cache-api-with-only-a-web-worker/640979/2 "2019-11-04T23:22:31Z")

</div>

You need to have SSL for taking advantage of any of the Service Worker-like capabilities including the Cache API. There isn’t a whole lot you can do to bypass that outside of being on localhost for local development. One approach you could do is use localstorage, but there is a limit to how much space you can use for it.

---

<div class="post-metadata">

**Author:** ![bstagy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bstagy/32/7351_2.png) [@bstagy](https://forum.kirupa.com/u/bstagy)\
**Post date:** [November 7, 2019, 12:42pm UTC](https://forum.kirupa.com/t/using-the-cache-api-with-only-a-web-worker/640979/3 "2019-11-07T12:42:09Z")

</div>

You didn’t actually read the body of my post, but no worries. I appreciate the response just the same…

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [November 8, 2019, 4:31am UTC](https://forum.kirupa.com/t/using-the-cache-api-with-only-a-web-worker/640979/4 "2019-11-08T04:31:15Z")

</div>

I understand that you won’t be able to use SSL, and my response was explaining that without SSL you can’t use the Cache API. Is there an additional detail that I may have missed?
