edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] pdf auto download
Date: Fri, 10 Apr 2015 12:22:01 +0100	[thread overview]
Message-ID: <20150410112201.GB21727@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20150307142353.eklhad@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

On Tue, Apr 07, 2015 at 02:23:53PM -0400, Karl Dahlke wrote:
> > If we changed the mechanism to be based on http headers rather than suffix,
> 
> The determination of whether to download an http file to disk,
> as opposed to in memory and browsing, is currently based on content-type
> as per the http headers.
> In other words, it already works the way you want.
> text/ or application/pdf is rendered, all else is downloaded.
> Of course you can override a download by typing a space, and keep it in memory.
> I do this sometimes for mp3 or wav off a website,
> if I just want to hear the sound and not save it somewhere.
> 
> This is not configurable, as you suggested.
> Perhaps something like
> 
> downtype = application/pdf
> 
> In the config file.
> I'm not sure what the defaults would be, and how to change them in .ebrc.
> It could be done, but I wonder if it would confuse
> more than it helps.
> I'm not sure the average user understands the various content types
> in http headers.

I'd just alter the existing mime mechanism to support a contenttype keyword
which would override the suffix keyword if specified.
I've never been a fan of specifying a mime type based on file extension,
and I find the existing mechanism of mapping arbitrary file extensions to
arbitrary mime types a bit... odd... anyway.
What I'm thinking is to have a mechanism where we check for a mime handler
for a particular type and adjust the prompt accordingly.
This would move us closer to the plugin mechanism supported by most other
modern browsers. In addition, given the way the web is heading,
this change will become increasingly important,
particularly as scripts are increasingly generating non-html output.

> Remember that ftp files are always
> downloaded to disk, since we have no indication of their type,
> the one exception to this being an ftp directory, which I load and browse,
> assuming you will select a file or subdirectory from this directory etc.

This seems sensible to me.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-04-10 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 18:23 Karl Dahlke
2015-04-10 11:22 ` Adam Thompson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-04-10 11:48 Karl Dahlke
2015-04-10 13:58 ` Adam Thompson
2015-03-28 11:18 Karl Dahlke
2015-04-07 17:43 ` Adam Thompson
2015-03-28  3:42 Karl Dahlke
2015-03-28 10:03 ` Chuck Hallenbeck
2015-03-28 12:13 ` Chris Brannon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150410112201.GB21727@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).