Ruby-on-rails – Chrome sends a request multiple times

google-chromeruby-on-rails

I have a Rails 3 app and just noticed that when using Chrome (on Mac) to access the app, every page on the site is being requested twice. This is happening in development and production (Heroku). Firefox and Safari only send the request once. The behavior is the same even when I remove all layouts and content for the action. It seems like there's a MIME type issue. Has anyone fixed this problem?

class PagesController < ApplicationController
  def home
    render :text => 'a', :layout => false
  end

This is the server log in development:

Started GET "/" for 127.0.0.1 at Mon Dec 13 10:33:33 -0800 2010

Processing by PagesController#home as HTML

Rendered text template (0.0ms)

Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.8ms)


Started GET "/" for 127.0.0.1 at Mon Dec 13 10:33:33 -0800 2010

Processing by PagesController#home as */*

Rendered text template (0.0ms)

Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 1.4ms)

Best Answer

I found what caused my problem, and maybe yours: I used Google Chrome's extensions named Web Server Notifier and Web Technology Notifier which made their own request.

After deactivating them, I got only one request per page.