app.templates.offlinePage = (docs) -> """

Offline Documentation

#{docs}
Documentation Size Status Action

Note: your browser may delete DevDocs's offline data if your computer is running low on disk space and you haven't used the app in a while. Load this page before going offline to make sure the data is still there.

Questions & Answers

How does this work?
Each page is cached as a key-value pair in IndexedDB (downloaded from a single file).
The app also uses Service Workers and localStorage to cache the assets and index files.
Can I close the tab/browser?
#{canICloseTheTab()}
What if I don't update a documentation?
You'll see outdated content and some pages will be missing or broken, because the rest of the app (including data for the search and sidebar) uses a different caching mechanism that's updated automatically.
I found a bug, where do I report it?
In the issue tracker. Thanks!
How do I uninstall/reset the app?
Click here.
Why aren't all documentations listed above?
You have to enable them first.
""" canICloseTheTab = -> if app.ServiceWorker.isEnabled() """ Yes! Even offline, you can open a new tab, go to devdocs.io, and everything will work as if you were online (provided you installed all the documentations you want to use beforehand). """ else reason = "aren't available in your browser (or are disabled)" if app.config.env != 'production' reason = "are disabled in your development instance of DevDocs (enable them by setting the ENABLE_SERVICE_WORKER environment variable to true)" """ No. Service Workers #{reason}, so loading devdocs.io offline won't work.
The current tab will continue to function even when you go offline (provided you installed all the documentations beforehand). """ app.templates.offlineDoc = (doc, status) -> outdated = doc.isOutdated(status) html = """ #{doc.fullName} #{Math.ceil(doc.db_size / 100000) / 10} MB """ html += if !(status and status.installed) """ - """ else if outdated """ Outdated - """ else """ Up‑to‑date """ html + ''