Wednesday 15 May 2013

jquery - IE8 cache ajaxSubmit -


I'm using the following function to upload / display an image

The target is that div Is where I am updating the content that is returned from the form function. I wanted Ajax so I do not have to reload the whole page only to upload and preview the image.

I upload an image, display it in the preview, I crop it, and do the second function which it displays in the new target (not shown),

< P> The problem is in IE 8, it starts caching all Ajax calls, even though I'm showing the only way to not set it up is a tough one. Is there a way to force it to not cache? It works perfectly in all other browsers.

  $ ("# profile-photo"). Submit (function () {var myOptions = {target: '# preview-target', before submitting): ShowRequest, success: showResponse, clearForm: true, resetForm: true, cache: incorrect}; $ (This) .jax submit (myOptions); Return back;}); I suspect that this submission is caching, it is more likely that this image is caching the URL. In your reply, are you sending the URL back to the new image? If so, try adding a query string:  
  & lt; Img src = "/ my / path / to / my / image.jpg? Q = 12345" />  

This should force all browsers to reload the image from the server.


No comments:

Post a Comment