Log a user out on closing of a tab or browser

When closing a browser/tab close a session.

$(document).ready(function () {
$('form').submit(function () {
$(window).unbind('beforeunload');
});
$('a').on('mousedown', stopLinkNav);

$('a').on('mouseleave', function () {
$(window).on('beforeunload', function () {
return 'Are you sure you want to leave?';
});
});

function stopLinkNav() {
$(window).off('beforeunload');
}
$(window).on('unload', function () {
$.ajax({
async: false,
url: "logout_ajax.php"
});

});
});

PHP FILE: logout_ajax.php



// php code to log user out here. or really do anything you might want to do
// good way to test it would be to log something, make sure its happening on closing of tab only and not just submitting a form or clicking a link, or changing url in the url bar.


I can’t open a PowerPoint presentation in 2010

Every time I would open a powerpoint from the network drive I would get a repair error.

I unchecked Enable Protected View for internet files in the PowerPoint  Trust 

Issue resolved!

 

I can’t open a PowerPoint presentation in 2010 « PresenterMedia Blog.