Re: [w3c/ServiceWorker] Allow Caching of POST requests (#977)

One more idea on POST body matching... What about using a checksum? Then you don't have to worry about the details of the POST body, you just run a checksum function and store that on the URL in the cache, and then when matching you're just comparing URL and checksum. For example, when I make any of my TeamRaiserCR API method calls, the URL is https://act.alz.org/site/CRTeamraiserAPI, but the checksum would be different for different POST parameters, so I might have in cache requests for https://act.alz.org/site/CRTeamraiserAPI:151, https://act.alz.org/site/CRTeamraiserAPI:193, https://act.alz.org/site/CRTeamraiserAPI:2391, where the number after the colon is the checksum number. Would that be simple and efficient enough to support POST body matching without having to know the exact details of the body contents?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/977#issuecomment-342538404

Received on Tuesday, 7 November 2017 16:27:32 UTC