Remember to block the browser cache for uploads

by Damien on November 21, 2007

Here’s one that can occasionally trip people up, both visitor and developer alike. On pages that contain an upload form, if you submit the form then click the browser’s back button to go back to the form again, many browsers incorrectly handle resubmitting the form thus potentially causing problems in your code. The best way to avoid problems is to block the browser’s cache of the page with the form by adding these lines to your page’s HEAD block:

<meta http-equiv="expires" content="Fri, 1 jan 1990 00:00:00 gmt" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
Bookmark and Share

Other Posts That Might Interest You

  1. Yay Google Is Helping Kill IE6
  2. Remember What’s Important
blog comments powered by Disqus

Previous post:

Next post: