Re: Generated javascript from .pl files



Bart Van der Donck wrote:
Thomas 'PointedEars' Lahn wrote:
Bart Van der Donck wrote:
Thomas 'PointedEars' Lahn wrote:
And the only thing that you would need to change over time is the
server configuration that says how .suffix (here .pl) is to be
handled.
Could you show the relevant httpd.conf lines how you would achieve
this ?
In its most simple form,

Options +MultiViews

I see. I wasn't aware of that technique.

Now come on, how many times have I written "Content Negotiation" already?

But I doubt it's the best here.

If you deem a technique to be not the best as a solution to a problem, you
would have to come up with an alternative that is objectively a better one,
i.e. has a considerable benefit over the former, or such a statement stands
and falls with your credibility among your readers.

I have been using Content Negotiation for years now. It works just fine,
even with Apache 1.x; it gives me little to no headache, and the performance
loss for the additional lookup really is insignificant. For example, do you
think I am updating the date of modification in [1] *manually* or that there
even exists an "es-matrix" directory? Do you think that I am using any
programming to determine what translation should be used automatically
according to the users preferences in [2]? I could go on, but it would be
better if you read the (Apache) docs on how CN automagically can work for you.

[1] http://pointedears.de/scripts/es-matrix
[2] http://pointedears.de/scripts/test/whatami

For the OP's question, I would still councel to use

AddHandler cgi-script .js

in a specific directory holding his perl-generated javascript files.

That would impose an unnecessary restriction, where

AddHandler cgi-script .pl
Options +MultiView

would not. So in what way would the former be better, please?


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
.



Relevant Pages

  • Re: How do search engines index multilingual content?
    ... because my browsers do not transmit q=0. ... It's already taken account of in the Apache negotiation algorithm, ... send me any other language which you have, ...
    (comp.infosystems.www.authoring.html)
  • Content negotiation in Apache
    ... I've been reading the docs for Apache 1.3.x trying to understand content ... negotiation, and while I think I'm starting to get the picture I'm not ... Can someone offer a quick hint to getting this working? ...
    (RedHat)
  • "Premature end of script headers"
    ... I get this message in my apache error log when I try to run a sample ... CGI script: ... configuration file says: ... AddHandler cgi-script .cgi .pl ...
    (comp.infosystems.www.authoring.cgi)
  • Re: pdf files and Internet explorer (created on Mandrake)
    ... > Peter T. Breuer wrote: ... If apache were to sometimes provide a file ... AddHandler cgi-script .cgi ... I presume the cgi-script handler is defined in one of the modules. ...
    (alt.os.linux)
  • Re: Apache2 + PHP4
    ... > specifying the .php extension ... Go read up on content negotiation in Apache. ... Prev by Date: ...
    (comp.lang.php)