Answer the question
In order to leave comments, you need to log in
How to make firefox correctly set the filename to .pdf by default if the url has a .html extension?
I generate a pdf file in the headers I pass header('Content-type: application/pdf');
The link to the script has the following form: root/gen_pdf/name_file.hml?get_params
The document must be previewed with the possibility of further saving.
Chrome and Opera in the prev menu Viewers offer to save the file as name_file.pdf , Firefox in the preview menu sets the file name as document.pdf.
If browsers are set to automatically download pdf: Chrome/Opera download the name_file.pdf file; Firefox file name_file.html.
What are the solutions to firefox by default set the file name name_file.pdf
Answer the question
In order to leave comments, you need to log in
Try adding a header to your response
Content-Disposition: attachment; filename="filename.pdf"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question