'setTimeout' handler took 225ms bundle.js code example
Example: [Violation] 'requestIdleCallback' handler took ms
<?php
session_start();
session_destroy();
unset($_COOKIE["current_user"]);
setcookie("current_user","",time() -3600, "/","", 0);
?>
<!doctype html>
<html>
<head>
</head>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '<app-id>',
cookie : true,
xfbml : true,
version : 'v2.8'
});
FB.AppEvents.logPageView();
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
window.onload = function(){
logout();
}
function logout(){
console.log("1");
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
FB.logout();
console.log("2");
window.location="login.php";
console.log("3");
}
else{
console.log("4");
window.location="login.php";
console.log("5");
}
});
}
</script>
</body>
</html>