Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Handle/cache offline-capable mode media requests in service worker #465

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Commits on Nov 14, 2022

  1. Configuration menu
    Copy the full SHA
    95ba407 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c94eef6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d8ebca9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c58d199 View commit details
    Browse the repository at this point in the history
  5. Fix: always serve current state of offline worker script

    This only affects dev, but otherwise requires a server restart to make any service worker changes
    eyelidlessness committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    02327cb View commit details
    Browse the repository at this point in the history
  6. Small service worker fixes

    - Claim clients immediately on activation. It's not clear this completely eliminates the need for a reload, but it does get part of the way there.
    - Don't attempt to cache responses for non-GET requests
    eyelidlessness committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    61da522 View commit details
    Browse the repository at this point in the history
  7. Fix: remove stale versioned caches

    Also, no reason for an array of keys which only ever has a length of one
    eyelidlessness committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    7e23a6e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bff15df View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    afe3ee3 View commit details
    Browse the repository at this point in the history
  10. Fix: always use the same cache key when requesting the page itself

    This should not vary between different forms. This actually fixes a bug in both the current implementation as well as the previous changes on this branch:
    
    1. Request offline-capable Form A while online
    2. Request offline-capable Form B while online
    3. Any changes which would trigger a service worker update
    4. Request offline-capable Form A again while online, which updates the service worker and wipes out the previous cache
    5. Request offline-capable Form B while OFFLINE, which will fail because its cached HTML has been removed
    
    Unless or until there is some meaningful difference in the HTML served for different forms, this change should be safe because the HTML and service worker will both be re-cached at the same time
    eyelidlessness committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    3491142 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    853985c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2636925 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4e25bce View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a1a4207 View commit details
    Browse the repository at this point in the history
  15. Document updated offline/caching behavior

    # Conflicts:
    #	tutorials/37-offline.md
    
    # Conflicts:
    #	tutorials/37-offline.md
    eyelidlessness committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    4e717f8 View commit details
    Browse the repository at this point in the history
  16. Remove blocking on initial form cache update

    And unnecessary try/catch block around initial non-blocking servicer worker update check
    eyelidlessness committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    5de6d66 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    10996fb View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    e9263c9 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    a1f6b7a View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1c39cec View commit details
    Browse the repository at this point in the history