Service worker and ranged responses

The problem: Service worker spec does not currently include any way to handle partial content requests ('range' header). When the browser requests a ranged response, Chrome 52 stops playing e.g. audio or video, and may throw errors too.

Work-around: Manually implement a ranged response during fetch event (based on this sample page).

Test audio

After the SW has installed and is controlling the page, try randomly moving the play location (while playing the audio), which should trigger a range request in Chrome.

Served by SW without any range support.

Served by SW with (limited) range support.

Also see