<div dir="ltr">I've not experienced this issue with the Racket web server. When you append a leading forward slash to a URL, you're obviously telling the browser something completely different about where to find the file. I would suspect it has something to do with either file organization, Racket web server configuration, or both. <div>
<br></div><div>Where are myimage.jpg and mytemplate.html in relation to one another? In the same directory? </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 7:04 AM, Janos Tobias Locsei <span dir="ltr"><<a href="mailto:jtlocsei@cantab.net" target="_blank">jtlocsei@cantab.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>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. <br>


<br></div>For example, I have a file mytemplate.html that includes the line<br><br></div><img src="/myimage.jpg" /><br><br></div>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. <br>


<br>It's not a big deal but I'm just wondering if there's a way around this.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Tobias<br><br><br>
<div><div><div><div><div><br><br></div></div></div></div></div></font></span></div>
<br>____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>