Sunday, August 18, 2019

Offline Capability Added for Pīnyīn Plus Expressions Web Page

[UPDATED 2019-08-22: Information has been added about mobile Safari’s limited lifespan for unused cached files, and about receiving new or updated material.]


While there are many advantages to web resources, including ease of loading (Just click/tap on a link in your web browser! No other app is needed!), speed of updating, etc., one disadvantage of web resources has been that one’s computing device generally had to be connected to the Internet for it to be able to access them.


In recent years, however, a new web technology called service workers has been developed to enable web resources to be loaded even when one’s computing device is offline (not connected to the Internet).


The Pīnyīn Plus web resource below has been enhanced with service worker technology, so it can now be loaded offline in supporting web browsers:

  • Pīnyīn Plus Expressions (Web)
    (Pīnyīn Plus expressions collected during
    the production of Pīnyīn Plus material
    linked to elsewhere on this site

    Pīnyīn (Pinyin) used as the default writing system,
    proofread, mobile-friendly,
    Can be used offline in supporting browsers,
    “flashcards” integrated with the text
    (tap/click on a Pīnyīn word to reveal its “flashcard”,
    tap/click on a “flashcard” to hide it),
    carefully done human-translated
    English translations with
    literal & effective meanings,
    Simplified & Traditional characters,
    📖 Reveal All, 📄 Reveal Advanced,
    and 📘 Reveal None controls for
    all the “flashcards” in a paragraph, etc.,
    sorted mainly by Pīnyīn,
    links for index headings
    (Your browser’s Find feature
    can also be used to search by Pīnyīn.
    To search by English or characters,
    first select 📖 Reveal All from the
    drop-down list at the top of the page.)

    Night Theme that can be turned on or off
    using the ☀️/🌙 button at the top right,
    adjustable text size)
  • Short Links:
    Links > Vocabulary Lists

The above web resource has also been updated with this related information:

To use this web resource while offline (not connected to the Internet):

  1. While online (connected to the Internet), use a web browser that supports service workers to go to this web page on the web. (Yes, this web page here, that you are now reading.)
    • Your supporting web browser will then automatically set up offline capability for this web resource. Part of that setup involves automatically saving this web resource and its associated files to a cache on your viewing device. (Info on different browsers’ storage limits can be found here.) After that, your supporting web browser will be able to load this web resource from its cache, even when your viewing device is offline.
  2. At a later time, if you just go to this web resource as usual in the above-mentioned supporting web browser (perhaps using a bookmark), this web resource should load and work as usual, whether or not your viewing device is connected to the Internet.
    • Note: A URL (web address) that starts with https must be used to load this web resource offline. Edit any related bookmark as necessary.
    • Note: Since storage space is still often constrained on mobile devices, the Safari browser on iOS (used on the iPhone, iPad, and iPod touch) will remove this web resource’s cached files if they remain unused for “a few weeks”—perhaps for just two weeks. So, if you will be wanting to use Safari on an Apple mobile device to access this web resource offline at a particular time, make sure that you load or reload this web resource in that browser (while either online or offline) no more than about two weeks beforehand.
  3. There is no Step 3!

Of course, while your device is offline, your supporting web browser will not receive any new or updated material for this web resource if that new or updated material gets uploaded to the web server after your supporting web browser last saved this web resource and its associated files to its cache. However, when your device is back online, loading this web resource in your supporting web browser will automatically cause your supporting web browser and its cache to be updated with any new or updated material on the web server for this web resource. (You may need to reload twice, or to first switch to a new tab or restart your web browser.)

Other Pīnyīn Plus web resources will also be enhanced with service worker technology as time allows.