Tags:
archive_me1Add my vote for this tag create new tag
, view all tags

Bug: Back From Preview Still Loses Text

Question:

Using the latest version of TWiki on TWiki.org which claims to have the BackFromPreviewLosesText fix installed, IE6 still loses edit content when the browser 'back' button is clicked.

[ DavidLeBlanc 22 Apr 2002 ] later

Answer:

 $ wget -S --http-user=DavidLeBlanc --http-passwd=xxxxx http://twiki.org/cgi-bin/edit/Codev/BackFromPreviewSTillLosesText
--12:22:20--  http://twiki.org/cgi-bin/edit/Codev/BackFromPreviewSTillLosesText
           => `BackFromPreviewSTillLosesText'
Resolving twiki.org... done.
Connecting to twiki.org[216.136.171.204]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Date: Mon, 22 Apr 2002 19:17:32 GMT
 3 Server: Apache/1.3.20 (Unix) PHP/4.0.6
 4 Cache-control: max-age=86400
 5 Expires: Tue, 23 Apr 2002 19:17:36 GMT
 6 Last-Modified: Mon, 22 Apr 2002 19:17:36 GMT
 7 Content-length: 96505
 8 Keep-Alive: timeout=15, max=100
 9 Connection: Keep-Alive
10 Content-Type: text/html

100%[====================================================>] 96,505        28.97K/s    ETA 00:00

12:22:30 (28.97 KB/s) - `BackFromPreviewSTillLosesText' saved [96505/96505]

If "Date" in the headers is the date/time of the request, why is it earlier then the "Expires" and "Last-Modified" date/times?

[ DavidLeBlanc 22 Apr 2002 ] even later!

Why is the topic title for every page in Codev downloaded for an edit!?! I've attached the text that wget downloaded showing this!

Test case

Edit text - click back button. See (new) edited text not appear in edit control.

Environment

TWiki version: ??? Current Twiki.org TWiki ( as of: 20020422)
TWiki plugins: ???
Server OS: ???
Web server: ???
Perl version: ???
Client OS: Windows 2000 Professional SP1 + hotfixes
Web Browser: Internet Explorer 6.0.2600.0000 ("update version q319182")

-- DavidLeBlanc - 22 Apr 2002

See BackFromPreviewArchive for followup


A browser is not required to cache a page simply because the server says to cache it. The cache control is a hint. The true cause of this problem is Twiki's reliance on browser cache behavior for page editing. The only 100% fix for this problem is to stop relying on browser cache behavior by making a "Re-Edit" button which renders a new page from the preview.

However, since the current "back" behavior works well in most cases and has some advantages, it's unlikely that TWiki will change anytime soon. There are some ways for you to fix this problem on the client end. Take a look at IeNoCacheWorkarounds.

-- DavidJeske - 07 Jul 2003

Going Back from Preview relies on what the HTTP spec calls a history mechanism - see section 13.13 of RFC:2616, which emphasises that this is quite different from caching mechanisms. In fact, the RFC seems to encourage the browser author to ignore the cache controls. So I'd say that IE is in violation of the spirit of this RFC, if not the letter - cache controls are hints, but they should really be ignored by history mechanisms (i.e. the Back button). TWiki's use of the Back button to get the previous Edit state (not as fetched from the server but as created by the user) is pushing the limits of what the HTTP spec envisaged, though

Of course, IE has such a dominant market share that there's a need for this bug fix. Even though it doesn't work in all possible cases, it does make this bug very rare indeed.

A re-edit button is one of the options discussed at length in BackFromPreviewArchive, but in reality it's much easier for the user to hit the browser Back button, so it's important that this works without changes to the standard templates and all skins.

I'm not convinced that the IeNoCacheWorkarounds capture all the reasons why IE may decide not to cache the previous page - e.g. it tends to flush this cache when you create a new IE window, and there may be other peculiarities, but it's useful to have this page.

I've renamed the EarlierDiscussion page so it makes a bit more sense on its own - it would be better not to refactor a whole page just to make your comment more prominent, as the earlier discussion is quite relevant and it's easy enough to go to the end of the page to see the new comment anyway. I've also re-instated David's original comments as it was rather hard to follow - splitting a single comment like this between pages doesn't seem like a good idea.

-- RichardDonkin - 08 Jul 2003

Fix record

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatEXT BackFromPreviewSTillLosesText r1 manage 94.2 K 2002-04-22 - 19:34 DavidLeBlanc Editing page content
Edit | Attach | Watch | Print version | History: r22 < r21 < r20 < r19 < r18 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r22 - 2003-07-08 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.