From: "Jon A. Lambert" Date: 2004-02-24T10:19:01+09:00 Subject: Re: Puzzling... "Osuka Adartse" wrote: > > I'm still don't know why Tdiary can use the *.rb files without IE goin' > dialog mmh, btw all the files keep the shebang. > Doing a scan of the TDiary code, it's because it sets the the content-type to text/html for it's webpages. The only exceptions to setting the content to text/html appear to be some pages it would produce for severe errors in exception processing (i.e. traceback output) The problem is simple but annoying. When Internet Explorer encounters a document with the content-type of text/plain, it searchs for a helper application based on the documents extension. The solution is to change the extension or change the content-type to text/html. The problem with changing the extension is that if one of the users browsing your web site has a helper application configured for that extension then IE is going to use it. For example changing it *.rbx isn't going to help if the user (say me) decided to associate *.rbx with their favorite text editor (I have). So the only way to be sure the user sees a document with the content-type of text/plain within the IE browser is to use no extension at all. That is 'helloworld.rb' becomes 'helloworld'. This solution is annoying for the developer as maybe their favorite editor's syntax highlighting is keyed of the extension. It's also annoying when trying to configure your webserver to properly handle files based on their extensions or having to move these files into special directories or using the location directive. I've encountered the exact same problems with perl. I understand how convenient it is to generate the normal EOL sequence in most languages and use text/plain as opposed to using html-style EOL sequences and use text/html. Unfortunately as most users are using IE, you are left with these choices. -- J. Lambert