Created
November 13, 2013 15:10
-
-
Save mshmsh5000/7450623 to your computer and use it in GitHub Desktop.
Clear Varnish from your browser console. Varnish must be configured to accept PURGE HTTP requests, you must be on the ACL if it exists, etc.
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
var xmlHttp=new XMLHttpRequest(); | |
xmlHttp.open('PURGE', top.location.href, true); | |
xmlHttp.onreadystatechange = function () { | |
if (xmlHttp.readyState === 4) { | |
if (xmlHttp.status === 200) { | |
console.log("Great"); | |
} | |
else { | |
console.log("Too bad"); | |
} | |
} | |
}; | |
xmlHttp.send(null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment