[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shall we serve scripts as application or as text?



Gunnar Wolf <gwolf@debian.org> writes:
> Simon McVittie dijo [Sun, Aug 29, 2021 at 03:13:02PM +0100]:

>> Using types outside text/ is definitely appropriate for very verbose
>> text languages like SVG and "flat" OpenDocument, where it's
>> *technically* text, and *technically* you could edit it with a text
>> editor, but in practice that's rarely what anyone wants.

>> For scripting languages like sh and Python, I'm not sure: either way
>> could be appropriate. Which is more common: sharing scripts as source
>> code to read and edit, or sharing scripts as executables to download
>> and run as-is? If the former, text/ makes sense, if the latter,
>> application/.

> I side with Paul Wise -- If a script is served by a Web server to a
> browser, I don't think the desired result will be to download and
> execute right away.

I certainly hope that no web browser would download *and execute* a script
from the web without user intervention.  I think the primary difference
between application/* and text/* is whether the web browser will display
the script like a web page by default or whether it will download it (but
not execute it) by default.

I'm not sure either of those will always be right.  In some cases, the
download behavior is probably desirable and displaying the script as text
will be irritating and make it harder to save; in other cases, downloading
it first will be annoying.  I personally would probably prefer the text/*
behavior most of the time, but I'm also not a typical user.

-- 
Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>


Reply to: