Goodbye Offline Page
Tags: changelog
Published: 2021-03-17 17:53:35

Dear DEV Community Members, 

I wanted to bring you all up to speed on a decision the Forem team recently made to remove our [Service Worker functionality](https://dev.to/devteam/instant-webpages-and-terabytes-of-data-savings-through-the-magic-of-service-workers-1mkc), and thus, our offline page. This was not a decision we came to lightly.

Like many of you, we all thoroughly enjoyed drawing in our browsers using the DEV offline page whenever our internet fritzed on us. Recently however, the cost of maintaining the Service Worker became exceedingly high for our team. Over the past couple of months, we've been having to put out one emergency fire after another, all because of our Service Worker functionality. 

A couple of weeks ago, I took a step back and assessed the situation. Given the fact that we lean heavily into edge caching, I figured that losing the Service Worker would not have a huge impact on performance and could save the Forem engineering team a lot of headaches. However, there still remained the question of the offline page. After chatting with @ben about our options, we decided to strip the Service Worker down so that its only function was to serve the offline page.

{% github https://github.com/forem/forem/pull/12834 %}

We deployed and rejoiced thinking our woes were over. 

### We were wrong

A few days after this deploy, our emergency Slack channel was once again lit up with users who could not log in from Safari. We put together [a fix](https://github.com/forem/forem/pull/12907) (and then [a follow up fix](https://github.com/forem/forem/pull/12909) 🙈) and shipped it. A few days after that, the emergency channel again popped up with a flood of log in problems being reported from users. Once again [we shipped a fix](https://github.com/forem/forem/pull/12953). After the [third day of this happening](https://github.com/forem/forem/pull/12971), I decided to turn to my engineering leaders to get their thoughts on the whole situation.

> What are folks' thoughts on the continuing issues we are having with the Service Worker? Ben greatly reduced its functionality to only the offline page bc of all the issues it has been causing and the giant sink it has been for developer time but it doesn't feel like things have gotten much better. My heart can't take many more days of coming back to my Slack with #emergency lit up and a 100 reply thread.

> Do we think things are going to get better once we have identified all the exception paths? OR do we still think it's going to be a landmine that will only continue to bite us? The cost of this offline page feature is getting pretty high and I am wondering if it's worth the cost. 

My incredible team and @ben all jumped in with their thoughts.

But there was another complication thrown into the mix: our offline page was supposed to help our SEO rankings! However, we were not sure _how much_ it was supposed to help. In the end, we weighed all our options and determined that the best course of action was to remove the Service Worker completely and monitor our incoming traffic using Google's Search Console.

Making engineering decisions is all about tradeoffs. In this case, the Service Worker feature was disruptive to both our users and to us as developers, which seemed to outweigh any benefits that it had provided. While removing the offline page is a bit disappointing, in the big scheme of things, it will make the Forem platform much more reliable and stable going forward.  

For more details, check out the removal PR below. 👇

{% github https://github.com/forem/forem/pull/12974 %}