Zola serve: fix video by adding support for Range requests

Currently zola serve doesn’t support video on Safari or seeking video on Chrome.

This is because both require Range requests which the dev server does not support.

I’ve added support for range requests in a local fork for myself here: GitHub - michaelkirk/zola at mkirk/range-requests and tested it on:

  • Safari (Version 14.1.1 (16611.2.7.1.4))
  • Chrome (Version 91.0.4472.114 (Official Build) (arm64))
  • Firefox (89.0.1 (64-bit))

This does add some complexity to the dev server, which right now is gloriously simple, but modern browsers apparently assume that Range requests will be supported for videos to function.

Is there enough interest from others that this is something worth trying to upstream?

I have just found this problem myself while developing my site, and I was confused why I could see my videos on my mobile (android) phone but not on my mac or iPad, though I never had any problems with Chrome. This post is the first answer that I found.

I ended up building to another directory and using static-web-server to serve during development of the videos.

Sorry I missed that. A PR for that will be accepted.