Issue with chrome in MVC application of calling Index multiple times

♀尐吖头ヾ 提交于 2019-12-12 02:29:53

问题


I am newbie with MVC applications and building MVC3 applications, I am facing very strange behaviour with chrome, in that it is calling Index() method multiple time (12 times)! I have tried looking in the console window and it shows warnings about images (seen below).

There is no problem at all in Firefox and it is working as expected, but chrome is creating the above problem. Please help me to find possible solutions with chrome if you have encountered this problem. Also please help me to identify other possibilities that have to created this situation.

Update:

I have tired to watch request in debug and found some issue of requesting favicon.ico in with chrome as per below image

So reason was this now how can i avoid this request multiple time (if do not want to put favicon.ico)?


回答1:


My guess is that you are seeing this when you run the website on the ASP.NET Development Server. Basically, the dev server is not correctly configured to send the correct MIME type (which should be image/* where * is the image type - png, jpeg, etc.)

As far as I know, it's not a real big deal when you're doing your local development (and Chrome is more strict about telling you about it).

The reason you see it as many times as you do is you see it once for each image you are transferring on the page (which is your Index page).

Update You may want to look at some of the information at this Stackoverflow question.



来源:https://stackoverflow.com/questions/9884036/issue-with-chrome-in-mvc-application-of-calling-index-multiple-times

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!