问题在打电话指数多次MVC应用镀铬 [英] Issue with chrome in MVC application of calling Index multiple times

查看:99
本文介绍了问题在打电话指数多次MVC应用镀铬的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手用MVC应用和建筑MVC3应用程序,我现在面临非常奇怪的行为,与镀铬,因为它是调用Index()方法多时间(12次)!我试图寻找在控制台窗口,并显示有关图像的警告(如下图所示)。

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).

有在所有的Firefox没有问题,它正在按照预​​期,而Chrome是创造了上述问题。请帮我找到铬可能的解决方案,如果你也遇到了这个问题。还请大家帮我鉴定具有创建这种情况其他的可能性。

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.

更新:

我已经厌倦了观看在调试请求,发现铬请求的favicon.ico按照下面的图片的一些问题

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

所以,原因是这个,现在我怎样才能避免申请多时间(如果不想放的favicon.ico)?

推荐答案

我的猜测是,你看到这个当您运行ASP.NET开发服务器上的网站。基本上,开发服务器配置不正确发送正确的MIME类型(这应该是图像/ *,其中*为图像类型 - PNG,JPEG等)

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.)

据我所知,这不是当你做你的本地开​​发(和Chrome将更加严格,告诉你这件事),一个真正的大问题。

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).

更新
你可能想看看一些在这个<一个信息href=\"http://stackoverflow.com/questions/3235649/mime-type-warning-in-chrome-for-png-images\">Stackoverflow问题。

这篇关于问题在打电话指数多次MVC应用镀铬的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆