The server may set this optional cookie to echo the HTTP method of the initial request.
If the initial page was loaded with a non-GET
HTTP method, Unpoly prefers to make a full
page load when you try to update a fragment. Once the next page was loaded with a GET
method,
Unpoly will again update fragments.
This fixes two edge cases you might or might not care about:
In order to allow Unpoly to detect the HTTP method of the initial page load, the server must set a cookie:
Set-Cookie: _up_method=POST
When Unpoly boots it will look for this cookie and configure itself accordingly. The cookie is then deleted in order to not affect following requests.
The simplest implementation is to set this cookie for every request that is neither
GET
nor an Unpoly request. For all other requests
an existing _up_method
cookie should be deleted.