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


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

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


Copy this code and paste it in your HTML
  1. var currentTime = new Date();
  2. var n = currentTime.getTime();
  3. postUrl = "http://www.example.com/test.php?nocache="+n;

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.