S
S
suhuxa12018-03-13 12:39:20
JavaScript
suhuxa1, 2018-03-13 12:39:20

How to open file download window in jquery?

Hey!
It is necessary that when you click on the link, a standard window opens: open\save the file. I did it simply through location.href, but then unknown extensions are downloaded. And what you need (pdf, txt) opens directly in the browser. So how to call the window? Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-03-13
@suhuxa1

try But it does not work in all browsers.

E
Eugene, 2018-03-13
@Elgorm

On jquery in any way, you need to change the headers that the server sends.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question