[plt-scheme] Problem with Post-Redirect-Get in FireFox

From: Anton van Straaten (anton at appsolutions.com)
Date: Thu Aug 9 11:39:50 EDT 2007

Jens Axel Søgaard wrote:
> What happens if you execute a HEAD for a servlet (and not a static
> file)?

I tried "HEAD http://localhost/servlets/configure.ss", with no 
parameters, which returns:

   200 Okay
   Date: Thu, 09 Aug 2007 14:24:13 GMT
   Server: PLT Scheme
   Content-Length: 7
   Content-Type: text/html; charset=utf-8
   Last-Modified: Thu, 09 Aug 2007 14:24:13 GMT
   Client-Date: Thu, 09 Aug 2007 15:24:13 GMT
   Client-Peer: 127.0.0.1:80
   Client-Response-Num: 1

> In the mean time, I have found out the the cache header didn't solve
> the problem completely. Now the servlet *sometimes* work with
> FireFox and *sometimes* not. Mostly like I have a mistake somewhere,
> but am looking in the wrong place.

This is giving me deja vu.  I recall, towards the end of the 20th 
century, having to use a redirect to a different page to get around 
similar problems with IE 4.  That's why I thought that the redirect to 
the same page was a plausible explanation here.

What we ultimately did, back then, was redirect to a static page which 
contained a META REFRESH tag, which caused a client-side redirect back 
to the page we really wanted to serve.  If you set the meta refresh 
timeout to zero, it's minimally noticeable to the user.

The application in question still does that today, nearly 10 years 
later, and has survived multiple changes in browser type and version 
without any problems related to that feature.  Sometimes a good 
workaround is the best long-term solution...

Anton


Posted on the users mailing list.