Bug 166965 - Browser history has duplicate entry after POST REDIRECT GET (PRG), press the back button and you are still on the same page instead of the previous one. All other browser behave correctly and redirect to the previous page.
Summary: Browser history has duplicate entry after POST REDIRECT GET (PRG), press the ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-01-12 00:14 PST by Valerio
Modified: 2017-01-16 19:13 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valerio 2017-01-12 00:14:34 PST
Repro : 
Build url A with a link to url B, that has a form that POST REDIRECT GET to url B and press the back button.

All browser behave correctly and it's very user friendly in this way : 
Navigate to url A, press lunk to url B, Submit the form, press the back button, you see url A.
In chrome
Navigate to url A, press lunk to url B, Submit the form, press the back button, you still see url B.

if you check the history object on the console you will see that in chrome it has one more entry (the duplicate one).
Comment 1 Alexey Proskuryakov 2017-01-15 00:13:21 PST
Thank you for the bug report!

You mentioned Chrome. Is this reproducible in any Webkit based browsers? Chrome is based on something that was forked from WebKit many years ago.
Comment 2 Valerio 2017-01-15 00:49:36 PST
I'm sorry, it came automatically, i can't try it in any safary browser because i do not own any Apple device. Sorry for bothering.
Comment 3 Valerio 2017-01-16 03:33:44 PST
I could reproduce the issue on safari 10.0.2
You can reproduce it here : 
http://chrome-prg-back.azurewebsites.net/

Click "Go to B", Click Save, Press the browser back button or the link "Back".
In safari you are still in PageB, in Firefox, IE, Edge you are in Page A (correct behavior).
Comment 4 Radar WebKit Bug Importer 2017-01-16 19:13:06 PST
<rdar://problem/30045821>