Can we be able to use Glitch offline?

I know that there is something called ServiceWorker, and that got me an idea.

Can we be able to use Glitch offline?

I’ve used ServiceWorker before, and LocalStorage works on there. Can’t Glitch just swap saving options automatically and make it so that its Local at first, but when we connect to the Internet, we can view our Project and have the code saved?

That might be an issue if someone else edits the project while you are offline.

2 Likes

I know, but can’t they save from their clients and then add the changes (make something like what takes what)

I don’t think the glitch team has done this because:

  • Building an offline version or desktop app needs a lot of C/C#/C++ and Glitch seems to focus on JavaScript.

  • Like @javaarchive said, this could lead to issues combining online and offline work.

3 Likes

Here’s what you can do.

  1. Set the origin of git on your computer to the glitch repo
  2. Do the commits locally when you code
  3. Push back to the origin when you get back a connection
3 Likes

There is another option: you can use the VSCode extension to code offline, and the code gets updated to Glitch as soon as you are back online.

6 Likes

Since glitch projects are basically git repositories, @javaarchive’s answer is pretty much the way to do it.

@Anish @javaarchive except for private projects- you require a username and password we don’t have