Using Strudel Offline
You can use Strudel even without a network! When you first visit the Strudel REPL, your browser will download the whole web app including documentation. When the download is finished (<1MB), you can visit the website even when offline, getting the downloaded website instead of the online one.
When the site gets updated, your browser will download that update on the next online visit. When an update is available, the site will refresh after the download is finished.
This works because Strudel is implemented as progessive web app (using Vite PWA).
While the browser will download the app itself, samples are only downloaded when you’re actively using them. So to make sure a specific set of samples is available when offline, just use them. Also, only samples from these domains will be cached for offline use:
https://raw.githubusercontent.com/*for samples uploaded to github
Inspecting / Clearing Cache
You can view all cached files in your browser.
- Open the Developer Tools (
Tools > Web Developer > Web Developer Tools)
- go to
Storagetab and expand
Cache Storage > https://strudel.cc.
- or go to the
Applicationtab and view the latest updates in
Chromium based Browsers
- Open Developer Tools (
Right Click > Inspect)
- go to the
- view downloaded files under
Cache > Cache Storage
- view the latest updates in
Strudel Standalone App
You can also install Strudel as a standalone app on most devices. A standalone app has its own desktop / homescreen icon and launches in a separate window, without the browser ui.
With a chromium based browser:
- go to the Strudel REPL.
- on the right of the adress bar, click
install Strudel REPL
- the REPL should now run as a standalone chromium app
Without a chromium based browser, you can use nativefier to generate a desktop app:
- make sure you have NodeJS installed
npx nativefier strudel.cc
- open to the Strudel REPL in safari
- press the share icon and tab
Add to homescreen
- You should now have a strudel app icon that opens the repl in full screen
- open to the Strudel REPL
- Tab the install button at the bottom
Ok, what are Patterns all about?