Created
February 20, 2015 21:41
-
-
Save mtandre/78a946beb8d6dfe79f9c to your computer and use it in GitHub Desktop.
Facebook Debug: clear Facebook's webpage cache (max 50 per url)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Facebook Debug: clear Facebook's webpage cache (max 50 per url) | |
javascript:(function(){ var encodedUrl=encodeURIComponent(window.location.href);function createXMLHTTPObject(){var XMLHttpFactories=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];var xmlhttp=false;for(var i=0;i<XMLHttpFactories.length;i++){try{xmlhttp=XMLHttpFactories[i]()}catch(e){continue}break}return xmlhttp} function sendRequest(articleUrl){var req=createXMLHTTPObject();if(!req||!articleUrl)return null;req.open("POST","http://graph.facebook.com/",true);req.setRequestHeader("Content-type","application/x-www-form-urlencoded");req.onreadystatechange=function(){if(req.status==200&&req.readyState==4){console.log(req.responseText);var obj=JSON.parse(req.responseText);alert("Article refreshed.\nTitle: "+obj.title+"\nurl: "+obj.url)}};req.send("id="+encodedUrl+"&scrape=true")}sendRequest(encodedUrl);})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment