Skip to content

Instantly share code, notes, and snippets.

@bodia-uz
Created October 25, 2013 10:37
Show Gist options
  • Save bodia-uz/7152720 to your computer and use it in GitHub Desktop.
Save bodia-uz/7152720 to your computer and use it in GitHub Desktop.
var r = new XMLHttpRequest(),
url = "https://dev28-lora-loreal.demandware.net/on/demandware.store/Sites-Site/default/SiteNavigationBar-ShowMenuitemOverview?CurrentMenuItemId=customers&itemType=Site";
setInterval(function(){
r.open("GET", url, true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
var date = new Date();
console.log(date.getHours() + ':' + date.getMinutes(),'session extended');
};
r.send("banana=yellow");
},1/*Minute*/ * 60 * 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment