Adobe plug-in detect using Javascript

ok, I have a HTML page open on the site with this meta tag

<META http-equiv="refresh" content="3;URL=http://www.example.com/example.pdf">

The page then redirects to the pdf, fine that works.

But I could change this to use a function instead, something like

<script language="javascript">
<!--

self.location.href = "http://www.example.com/example.pdf"

//-->
</script>

2 problems with this though.

  1. With the meta tag I can put a message on the page that says “You’re being redirected to our pdf, if not click here”, this is because of the 3 second delay specified in the meta tag. Any ideas how to do this using JavaScript?

  2. If I was doing this I would want to direct people with the Adobe reader installed to the pdf and redirect the others to a page saying “you need to download adobe reader, click here”…anyone know any detection codes for whether or not the user has the reader installed?

Also on some peoples browsers the inital page stays open and opens the reader outside the browser (kinda popup style). I know this is a setting in the reader but does anyone know a way of stopping it from doing this OR a way to detect it’s done this and close the browser window behind it?

Any answers to any of my 3 questions is appreciated, thanks :slight_smile: