Shiming Request.formData in Safari
While building a simple CRUD PWA using only service worker JavaScript and relying on Form submissions for data handling, I encountered an issue with Safari not supporting request.formData()
. I created a small shim to work around this by parsing the x-www-form-urlencoded
request data as a query string and using URLSearchParams
to process data similarly to a FormData
object. This approach isn't suitable for multipart forms and requires a different solution.