How to open a link to a pdf file in a new tab using html

I have an html page containing a link to an open pdf file. however, this link opens in Adobe Reader when I click on it. I set the target property to empty. but it doesn’t work either. I want to open this pdf file in a new tab in the same window.

+7
html file pdf hyperlink
source share
2 answers

target="_blank" is the correct path, but if it opens in a new tab, a new window or adobe reader depends on the settings of the user's browser and cannot (and should not!) be controlled by you.

+11
source share

On my sites I use:

target="_tab" since most browsers now know that people want something to open on new tabs instead of new windows. I can confirm that this works for me in the following web browsers:

Opera , Chrome , Flock , Firefox and Maxthon .

However, it still does not work on any version of Internet Explorer, including their new beta version: 9. Apparently, this boils down to "User Preferences" with Internet Explorer.

Determining which application opens a particular file format is currently and should always be provided to the user, not the developer *.

+3
source share

All Articles