We're coming across some strange behaviors in Safari whilst developing
a site for a client. Currently this behavior is not reproducible in
Firefox and I assume other browsers.
I haven't had time to put together a test page, however a brief
synopsis follows:
1. Some content is loaded through the $.ajax function and appended to
a modal popup. The dataType is set to HTML and it's appended via the
html() function:
$.ajax({ dataType: 'html' }
...
$popup.empty().html(html)
2. The popup now contains a form. The <input type="submit" /> text may
say something like "Submit form".
3. When the form is submitted, a new page is loaded. A different form
is loaded into the popup using the same method above. Except this time
the <input type="submit" /> box still reads "Submit form" when it
should have different text.
I've tried dumping the output of the $.ajax call to the console and
sure enough the correct HTML is being returned from the AJAX request.
This also happens with the values of input boxes as well. It's almost
as if Safari is caching the nodes somehow between requests.
I'm going to create a test page when I have time, but is this a known
issue? Does anyone have any short-term suggestions for how to fix or
get around this?
Thanks