It's making the request each time (and getting a 304: not modified). I verified with wireshark that it's doing the same thing. I ran the tapestry quickstart app, I had the layout.css file open and hit refresh 3x in the browser. Here's the log from 2 different runs:
2011-02-19 11:44:08.445::INFO: Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server [INFO] AppModule.TimingFilter Request time: 8 ms 0:0:0:0:0:0:0:1 - - [19/Feb/2011:16:44:08 +0000] "GET /myapp5.2.4/layout/layout.css HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" [INFO] AppModule.TimingFilter Request time: 0 ms 0:0:0:0:0:0:0:1 - - [19/Feb/2011:16:44:21 +0000] "GET /myapp5.2.4/layout/layout.css HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" [INFO] AppModule.TimingFilter Request time: 1 ms 0:0:0:0:0:0:0:1 - - [19/Feb/2011:16:44:22 +0000] "GET /myapp5.2.4/layout/layout.css HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" 2011-02-19 11:45:14.043::INFO: Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server 0:0:0:0:0:0:0:1 - - [19/Feb/2011:16:45:18 +0000] "GET /myapp5.2.4/layout/layout.css HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" 0:0:0:0:0:0:0:1 - - [19/Feb/2011:16:45:19 +0000] "GET /myapp5.2.4/layout/layout.css HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" 0:0:0:0:0:0:0:1 - - [19/Feb/2011:16:45:20 +0000] "GET /myapp5.2.4/layout/layout.css HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" You can see in the first case the TimingFilter printed out the time each time I hit refresh, but in the second run it didn't. If I kill and restart jetty sometimes it prints, sometimes it doesn't. Have you tried running the quickstart app and verifying if this happens for you too? You get it running with 2 commands from http://tapestry.apache.org/getting-started.html On Sat, Feb 19, 2011 at 11:13 AM, martijn.list <martijn.l...@gmail.com>wrote: > On 02/19/2011 05:07 PM, Donny Nadolny wrote: > > I have a few static javascript files which are used on 3rd party > websites, > > so they have the full url to my website hard coded in to them (for ajax > > calls). In order to test things locally, I need to replace that url with > > localhost. I've made a page which returns the modified file, and I want > to > > replace all requests for /js/myfile.js with page render requests to > > /js/localhostjs which gives the modified file. > > > > I've made a RequestFilter that's only loaded in development mode, but the > > problem is it isn't always loaded properly - when I start tapestry (maven > > jetty:run) about 1/3rd of the time it works, but the rest of the time it > > doesn't. > > > Are you sure it's not just your browser that's caching the file? Can you > repeat your test but now make sure your local browser cache is always > cleaned between every test. > > Kind regards, > > Martijn Brinkers > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >