2

Google chrome is sending multiple requests for a page. I'm using c# asp.net mvc 3 razer. when i tested with other browsers, it is only executing one time. i checked the requests with fiddler. so i noticed that chrome is sending 2 requests. Any idea about how to prevent the additional requests?

Thanks.

DShah
  • 9,768
  • 11
  • 71
  • 127
Ullas
  • 93
  • 9
  • You should better post the code that is causing this problem :) – Kevin Cloet Aug 26 '11 at 06:42
  • Have you tested in different browsers? You aren't giving enough information. – awrigley Aug 26 '11 at 07:39
  • sorry for my short explanation. This is only happening in Google chore. Please see the fiddler screenshot here. In chore it calls "/Posts" method 2 times. IE (9) http://postimage.org/image/2wc7yccdg/ Google Chrome (13.0.782.215 m) http://postimage.org/image/2wd02h8ro/ – Ullas Aug 26 '11 at 07:56

3 Answers3

1

Do you have a favicon? Chrome will send a request for favicon on every single request until it finds one.

server socket receives 2 http requests when I send from chrome and receives one when I send from firefox

Community
  • 1
  • 1
jrummell
  • 42,637
  • 17
  • 112
  • 171
  • You save my week. When favicon is used without slash like it leads to make 2 request to the same address but with and without parameters – Sergei Shvets May 07 '19 at 08:34
0

Do you have any JavaScript on this page that make calls to the server?

If so, perhaps the events with the JavaScript are firing differently among the different browser which would explain why you see a double hit in some browsers but not others.

Hector Correa
  • 26,290
  • 8
  • 57
  • 73
  • Thanks for the tips. Actually this is happening in all pages in my application. there is no such script intentionally calls to server on page loads. This is happened only in each pages load, while executing any button action it working as usual. Is this some thing related to goggle chrome's pre-fetching page mechanism?. This makes all the db calls 2 times in page load. – Ullas Aug 31 '11 at 00:37
0

Do you have any chrome extension that might trigger the second request? I know that HTML validator extension for chrome occasionally does this. Try disabling all plugins extensions and see if the issue still occurs

Duy
  • 1,332
  • 1
  • 10
  • 19