Bug 4072 - Pressing back in browser misses out a page.
Summary: Pressing back in browser misses out a page.
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 312.x
Hardware: Mac OS X 10.3
: P3 Minor
Assignee: Trey Matteson
URL: http://www.liverpoolfc.tv/
Depends on:
Reported: 2005-07-19 12:02 PDT by David Storey
Modified: 2005-07-26 19:16 PDT (History)
1 user (show)

See Also:

proposed patch (1.94 KB, patch)
2005-07-19 21:20 PDT, Trey Matteson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Storey 2005-07-19 12:02:30 PDT
Steps to reproduce:

Go to http://www.liverpoolfc.tv/  (It should redirect to a splash page if it is your first visit),
Click "Enter Liverpool FC TV", 
Click on a news item (Such as "WATCH TONIGHT'S GAME LIVE ON .TV"), 
Press back in the browser.

Expected output:

Should return to the homepage

Actual output:

Returns to the splash page, missing out the homepage.  

This works in Opera, Gecko and IE/Mac.  Note the the site uses a cookie so that the splash page only 
shows once a day, so it will not work if you have already visited the site today. 

trey2 on irc mentioned:  "part of the puzzle is that when you click on the "enter site" link, you go again 
to the same URL that you started with.  Safari sees that as the user going to the same place twice in a 
row, which doesn't create a second back/forward item.  Which still doesn't explain the misbehavior..I 
think the root of the problem is that the single b/f item has the resulting address after redirects have 
happened, and that doesn't get updated by the fact that the second visit to the same URL does not yield 
a redirect (because of the cookie)."

I will try to write a reduction in a while.
Comment 1 Trey Matteson 2005-07-19 21:20:18 PDT
Created attachment 3024 [details]
proposed patch
Comment 2 John Sullivan 2005-07-20 10:20:24 PDT
Comment on attachment 3024 [details]
proposed patch

Patch looks good. Please explain how you tested.
Comment 3 Trey Matteson 2005-07-20 13:27:51 PDT
Primarily I tested the case described in the bug, as the fix is fairly specific to the odd case of the fetching 
the same URL resulting in arriving at 2 different final URLs (because of redirects that are dependend on 
cookies).  I also did some basic testing of refreshing a page and reloading a page, to look for major 
Comment 4 Darin Adler 2005-07-25 20:25:00 PDT
Comment on attachment 3024 [details]
proposed patch

Looks good to me, r=me.
Comment 5 Darin Adler 2005-07-25 20:25:14 PDT
Comment on attachment 3024 [details]
proposed patch

Looks good, r=me.
Comment 6 Justin Garcia 2005-07-26 19:16:44 PDT
Landing this...