1

I am using jquery UI dialog with Grails. I have some input text boxes on the dialog box. I enter some data, click on save, everything works fine (the data gets saved properly) and closes itself. But on the parent page when I open the dialog box again, the old data is only displayed. This is happening in IE8. I have to refresh the server to enable the dialog box to show the updated values. I am using something like

$("#divid").load(${createLink....}).dialog('open');

The data gets refreshed properly in FF. Why is this happening? Also I am using modal:true..

Thanks a lot

user781178
  • 23
  • 4

2 Answers2

0

The data gets reloaded using Ajax? Make sure you got an expire header in your server page. Browsers cache pages, and if you don't specify the period, they will make up an expiration time of their own. This default time is longer in IE than in FireFox.

PHP example. Don't know how to do that in Grails, but you'll get the point. ;)

<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
GolezTrol
  • 114,394
  • 18
  • 182
  • 210
0

You have to use jQuery.ajax with cache:false option or some other trick to prevent IE from caching request. Take a look at Stop jQuery .load response from being cached

Community
  • 1
  • 1
Farshid Zaker
  • 1,960
  • 2
  • 22
  • 39