middleman/middleman — Issue #234: Page sometimes doesn't render when refreshing w/ preview server
Author: bhollis
Created: 2012-01-09 04:59:19+00:00
State: open

I'm getting a problem with middleman master where about every other time I refresh my page, I get a blank response.

I think it has something to do with the `__middleman__` change request the file watcher sends to notify of file changes. I turned logging on, and when the page renders OK, I get:

```
== Request: /software/pnggauntlet/
== Render Start: /Users/brh/Documents/websites/brh/source/software/pnggauntlet/index.html.haml
COUNT: 1
== Render End: /Users/brh/Documents/websites/brh/source/software/pnggauntlet/index.html.haml
== Finishing Request: /software/pnggauntlet/index.html
```

but when there's a blank page, I see:

```
== Request: /software/pnggauntlet/
== Render Start: /Users/brh/Documents/websites/brh/source/software/pnggauntlet/index.html.haml
== Request: /__middleman__
COUNT: 1
== Render End: /Users/brh/Documents/websites/brh/source/software/pnggauntlet/index.html.haml
== Finishing Request: /software/pnggauntlet/index.html
```

I think the `__middleman__` request is clearing out some cache or something while the page is rendering, messing with the response.

I've also noticed occasions where the wrong image will get rendered - as if the requests got mixed up somehow.