[Xitami] directory listing locationbar
Johannes Prost
xitami@lists.xitami.org
Sat, 05 Jun 2004 15:50:01 -0600
Hello Marc,
If I understand this correct, see more below
Am 5 Jun 2004 um 21:11 hat Marc Doigny geschrieben:
> >Xitami 2.5b6
>
>
> There are no stupid questions.
> For a web server each request (main page, first gif, first jpg, first
> javascript source, second gif, ... and so on) is a completely new one. The
> browser has no memory of what was loaded before (except if it looks in the
> logs).
>
> To prevent the usage of your gif, you must create it on-the-fly (using a
> script, for instance).
> You also need some server scripts.
> This is just one example, they are probably more possibilities:
>
> <html>
> <script src=cgi-bin/create.js></script>
> <script>
> function makegif(a)
> {
> document.write("<img src=' + a + b + '.gif'>");
> }
> </script>
> <body>
> <h1>This is my protected gif:</h1>
> <script>
> makegif("photos/special");
> makegif("photos/second");
> </script></body></html>
>
> The function "makegif" in your html will create the call to the gif
> on-the-fly, using the parameter that's provided by create.js
>
> Now the special thing resides in create.js.
> It's a script that produces a single output line (using a random generator)
>
> var b = 124582134;
>
> and renames the image to
> photos/special124582134.gif and the same with the second gif.
>
because of this randomly chosen "extended" file name the viewer actually isn't able to call the
file directly.
> For more help (and maybe an easier way to do it), you could ask it on the
> webreference forum:
> http://www.webdeveloper.com/forum/
>
will do that.
> marc
>
>
Johannes