NEW 202963
Wrong HTTP method (POST instead of GET) when reload a page after pushState if previous page was loaded by a POST
https://bugs.webkit.org/show_bug.cgi?id=202963
Summary Wrong HTTP method (POST instead of GET) when reload a page after pushState if...
huocp
Reported 2019-10-14 18:29:32 PDT
Created attachment 380942 [details] a nodejs script to run a local http server on port 8000 To reproduce: 1. use attached nodejs file index.js, run `node index.js`. 2. use Safari to visit http://localhost:8000/ 3. click "try" button in the page, it submits a POST form, renders a new page http://localhost:8000/do, 4. now open dev inspector, goto console, run `history.pushState({}, "", "/whatever");`, the browser window now shows latest url "/whatever". 5. use browser window reload button to reload current page. 6. safari should ask you "Are you sure you want to send a form again?", click send. 7. in dev inspector, goto network tab, double check the request to "/whatever", it's a POST request. This bug was first reported in 2017, so it's likely affecting multiple Safari/webkit versions, not only latest Safari 13. This wrong behaviour does not affect Chrome and Firefox. https://stackoverflow.com/questions/46933389/safari-send-post-request-when-refresh-after-pushstate-replacestate https://github.com/aurelia/history-browser/issues/34#issuecomment-540926059
Attachments
a nodejs script to run a local http server on port 8000 (861 bytes, application/x-javascript)
2019-10-14 18:29 PDT, huocp
no flags
Radar WebKit Bug Importer
Comment 1 2019-10-15 10:58:49 PDT
Note You need to log in before you can comment on or make changes to this bug.