//
// wait for pending ajax calls to finish first
//
var timer = setInterval(function() {
if ($.active==0) {
clearInterval(timer);
window.location.assign("www.google.com");
}
}, 500);
Wednesday, December 3, 2014
Waiting for AJAX
If you need to transfer execution of your page to somewhere else, but want to make sure you don't have any pending (jquery) ajax calls, use the $.active variable as below:
Tuesday, December 2, 2014
How to delete multiple keys in Redis
At the command prompt:
where "some-prefix" is the key prefix you want to delete.
#redis-cli KEYS "some-prefix*" | xargs redis-cli DEL
where "some-prefix" is the key prefix you want to delete.
Subscribe to:
Posts (Atom)