[racket] web server: leading forward slash required in paths?

From: Janos Tobias Locsei (jtlocsei at cantab.net)
Date: Tue Jan 28 10:04:32 EST 2014

I noticed that when using the racket web server one needs to include a
leading forward slash when referencing static files e.g. a style.css or an
image.jpg. Is there a rationale for this? It's different than the usual
html convention, and it means that when using html template files it's not
possible to preview the template in the web browser without running the web
server.

For example, I have a file mytemplate.html that includes the line

<img src="/myimage.jpg" />

The leading "/" is required for the image to be found by the racket web
server but it means that I can't preview mytemplate.html in my web browser
without first firing up the racket web server.

It's not a big deal but I'm just wondering if there's a way around this.

Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140128/cf23fe48/attachment.html>

Posted on the users mailing list.