a quick example:
<img id="example" source="example.png"> // This is my container in another file
<scipt>
// Here I execute a php script that changes the image 'example.png'
$('#example').hide().load('content/content.php #example').show();
</script>
After this script is done the picture didn't updated.
Is there a way to force a Cache refresh for #example.
Something like:
<scipt>
// Here I execute a php script that changes the image 'example.png'
$('#example').hide().load('content/content.php #example').show();
// Refresh Cache for #example or execute php(refresh)
</script>
Thanks
If you request url's, you can add GET
parameters to it, making the browser think its requesting a different page. This makes the browser always download the latest version.
You can try the following. I'm not very good with JQuery myself but I do believe this will work:
$.get("content/content.php",{},function(e) {
// now we update the image since the content.php has finished loading.
$('#example').attr("src","example.png?e="+(new Date().getTime()));
});