Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera
  • Hello,

    I'm developing a site where I am using the common Post/Redirect/Get pattern ( when submitting forms. In my particular case this is items for a todo list - so I'm POSTing to say, processing that request server side adding the new item to a database, and then returning a 302 response ( to indicate the browser should redirect (GET) to which then displays a list of all the todos submitted to the db. This works on Opera Mini, but on both Opera Mini on Android (v12) and on the microemulator on Mac OSX (I haven't tested on other versions), the resulting page shows the list of todos without the new item, until I refresh the page manually at which point the list returned does include the new item.

    I'm assuming what's happening here is that the page being shown after the redirect is the version which has been cached on Opera's proxy server previous to the POST request. If this is the case, is there a way I can indicate to the proxy server that it should display a fresh version of the page from my server rather than the cached version? I have also tried the more correct 303 status code ( but the same thing happens - although the spec says for this:

    'The 303 response MUST NOT be cached, but the response to the second (redirected) request might be cacheable'

    although I have found no references to how this redirected request can me marked as non-cacheable. Incidentally all other browsers seem not to cache this redirected request at all.

    Thanks very much for you help in advance.


  • It's probably not a problem with caching any redirect but rather caching the original GET to the You might try setting some cache control headers on this very resource to enforce revalidation in the server browser or use some bogus random query to treak the server into thinking, it's dealing with different URL.

    You could as well look into using attribute with JS. Not sure whether this feats well your design.

  • Thanks Smyru - I will have a look at as I think that might fix it.