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

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



Quoting Gunnar Wolf (2021-08-30 17:07:23)
> 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. text/* seems much better suited for me. Users 
> willing to execute said scripts should download and execute locally -- 
> and nobody should be bitten by the surprise of automatic (even after a 
> UI acknowledgement) code execution of random Internet content.

You cannot know that a human is at the other end of the exchange.

You can choose to be honest about what your serve your audience, or you 
can try steer them when you think that you know better than them what 
they should do with it.

I think that the game of steering certain types of users belongs in the 
configuration files of web servers for specific web sites, not in the 
general defaults of the whole system.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature


Reply to: