![]() When a Content-Disposition is inline (or unspecified), the browser will try to open the file in the default embedded viewer. Additionally, it does tell the browser (correctly) that it's an application/pdf file - but since it's an attachment the browser will still default to downloading. This tells the browser to always download ( attachment) the file, and to give it the default filename of Schubert-Sonata-21-B-flat.pdf rather than inferring it from the URL. If you open your browser's developer tools, you'll see that particular link sends the following response headers: Content-Disposition: attachment filename="Schubert-Sonata-21-B-flat.pdf" ![]() Inline is the default if not otherwise specified, and means the browser will open the file within the browser window if it is able to.Īttachment means to always download the file, never attempt to open it inside the browser. Specifically, it can send either inline or attachment. That's usually because the site sends a Content-Disposition header in the response. Sometimes it's because the site dev has no idea what they're doing. ![]() ![]() ![]() Other times, it's because it's a default option for whatever software they're using (e.g. Occasionally, it's because the website developer decides they want this behaviour, e.g. Basically, this happens because the website tells the browser to do it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |