Posted By

kutyadog on 09/24/12


Tagged

javascript time random timestamp


Versions (?)

Javascript using time to make GET POST calls no cache / random


 / Published in: JavaScript
 

URL: http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results

Simple code example that allows you to pull a time stamp / timestamp to attach to end of URL for GET POST calls

  1. var currentTime = new Date();
  2. var n = currentTime.getTime();
  3. postUrl = "http://www.example.com/test.php?nocache="+n;

Report this snippet  

You need to login to post a comment.