I want to check if browser support pdf viewer or not before anything loads on page and then if pdf viewer is not enable, I want to display alert pdf viewer is not enable and redirect to some other page.
I tried
window.onload = function () {}
$(document).ready(function () { });
$( window ).load(function() { });
but it still shows page in background. I do not want to display page until it is confirmed that pdf viewer is installed. Please help.