Ajax non load cash


/ Published in: jQuery
Save to your folder(s)

From time to time I need a Ajax function to not cashe the template it load. I only have notest this problem in IE.


Copy this code and paste it in your HTML
  1. function LoadmainContent () {
  2. $('div#maincontent').hide('clip',100,function() {
  3. $(this).load('some_page.tmp' + '?rnd='+ String((new Date()).getTime()).replace(/\D/gi, ''),function() {
  4. $(this).show('scale',800);
  5. }
  6. });
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.