I need to download a pdf via ajax request then open it in a new tab. I know that major browsers discourage this but is this possible?
I currently use window.open then execute the pdf download in the new window.
The problem with window.open
and target="_blank
" is that most browsers will block this as a popup. target="_self"
works fine though but is not the desired behaviour
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.