ClosestStorm / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

The .js suffix causes problems with client side scripts #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Apache-Configuration causes problems with client side JavaScirpts:

AddHandler v8cgi-script .js

When a JavaScript file is declared in the HTML header with 

<script type="text/javascript" src="script.js"></script>

it cannot be loaded, an error is throw. (The client side JavaScripts didn't
proceed for some days on my server until I considered the problem) Shortly
.js is used elsewhere...

You recommend to use the "sneaky" .ssjs oder .sjs. But I am not a fan of
this (sorry) ill-sounding suffix, even-more in German it sounds some kind
of "chubby" :o(

An other possibility occurs with the raccoon engine witch uses JX. I like
this variant that signifies slightly to the good old ajax - and it's
"magic", allowing some server side access for client side JavaScript. 

Since I have an impression that that bothers you (?) My proposal as
compromise is jsi for JavaScript Server Side, it fits to v8cgi and can
speak well.

Original issue reported on code.google.com by bienmano...@googlemail.com on 3 Nov 2009 at 1:33

GoogleCodeExporter commented 9 years ago
This is not related to v8cgi. You are free to configure your Apache as you 
wish; this
includes changing of the extension as well as having a separate configuration 
for
server and client-side scripts:

/client/*.js - no special handler
/server/*.js - v8cgi handler

Original comment by ondrej.zara on 3 Nov 2009 at 7:21