Re: Question of the day: (.???) for Compiled AppleScript Files
Re: Question of the day: (.???) for Compiled AppleScript Files
- Subject: Re: Question of the day: (.???) for Compiled AppleScript Files
- From: Sander Tekelenburg <email@hidden>
- Date: Thu, 6 Jun 2002 17:53:55 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 02:10 -0400 UTC, on 06-06-2002, email@hidden wrote:
>
I'm placing some AppleScript files up on a hosted web server, and it seems
>
that no matter how I do it, the result from the web browser is always
>
displaying the file as a text file (or as a few junk characters if the file
>
is a compiled script). I know that several of you have sites with
>
AppleScript files out there -- how are you tagging them as 'download on
>
open' rather than 'display on open' for the sake of the browser (.bin,
>
.hqx, .osas?)? I'd
>
prefer them to download without any compression in usage because of their
>
small size...
The issue is HTTP, and thus server configuration - nothing else. Tell your
server to send out a correct MIME type (using HTTP's "content-type" header)
for the file. If it appears as text, then your server is claiming the file is
a text file. Your browser obeys that and treats it as a text file. (Mind you,
if what you are serving is the raw uncompiled script text, then this would be
correct behaviour.)
The second thing is to understand that an author cannot "force" something to
download instead of being loaded in-line. That sort of decision is 100% up to
the user. (When you'e surfing, do you want mp3s to be displayed in-line using
the QT plug-in, or do you want them to be handed over to your favourite
external helper app, or just download and do nothing? All up to the user.)
Like Rob says, for binaries, ".hqx" is probably safest, but ".sit" files are
safe enough IMO. But, with the proper MIME type, you can use anything. File
extensions do not mean much (except to Internet Exploder). It is the MIME
Type that counts.
See your server documentation for details. (If Apache, see
<
http://httpd.apache.org/docs/>). The bit you're interested in is
<
http://httpd.apache.org/docs/configuring.html>. Look for ".htaccess".
For serving uncompiled scripts (text files) you probably want to add a line
in your ".htaccess" file saying something like:
AddType 'text/plain; charset=mac-roman' osas
(assuming you give your uncompiled AS files' names ending with ".osas")
Note: people often think they cannot configure their server because they just
a have a normal account at some ISP. But often you _can_ configure your
little part of the server. After all, it usually is Apache, running on a unix
box, which means it is a multi-user system. Just like on Mac OS X, every user
can set his own prefs. In case the server's admin does not allow you to
configure your bit, ask him to do it for you.
HTH
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBPP+FkOsywKfXgqKdEQItVACeLqjZs1dxXG9MMbDgVAtEQijO1woAn3As
wdW70qQ6KauUesRoBe4fjedd
=Pzm3
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <
http://www.euronet.nl/~tekelenb/>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.