简体   繁体   中英

How to show save as on Internet browser of a mobile device

I am writing a page (html, javascript) that is going to be used absolutely for mobile devices. This page is going to serve some files (typeof: pdf, doc, docx and many others) that browser doesn't recognize. How can I force browser to give the option of saving file and open it with the appropriate installed app? I tried _blank but nothing, it opens the page and ... raw data appear (not even a new tab starts).

It sounds like you need to make sure the web server is serving the correct mime-type for your content. For uncommon or forced-download types, it can be served as application/octet-stream .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM