开发者

Missing IMG src leading to multiple unknown server requests

Hey my application has a map that is drawn with custom marker images rendered on OpenLayers VectorLayer. The problem here is that I see a lot of requests to the page that has this map and this comes to the server and all the server side code written for that page is executed and HTML is returned to the client and I get an error saying

Resource interpreted as image but transferred with MIME type text/html.

My guess is that the markers rendered on the page are rendered as img controls but their src is set to blank. You can read more about what happens when your control is having the src value as empty here: http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/

I want to find out if these markers are what that is causing the problem or s开发者_JS百科omething is kicking off a infinite redirect which is not the case as I always see that it stops after a certain no of requests.

As mentioned in the post above it happens only on Webkit browsers and not on FFX.

Can someone help me find out the src of these requests if there is someway I can track it.

Thanks in Advance.


"Can someone help me find out the src of these requests if there is someway I can track it."

Sure.

Presuming you have Firebug installed, open the Firebug panel and click the Resources tab. At the top, in the left pane that lists tons of stuff, you should see a folder that represents your web page. Open that folder and look for Images. If anything is broken or missing or linking to the wrong place, you would be able to see it there.

If that doesn't satisfy your needs, click the Network tab in Firebug. If you don't see anything there, reload the page. You'll see, more or less, in chronological order, all the page elements that should have been downloaded to render the page, even the parts that are missing.

Look for the image(s) in question, click it once on the left, and you'll see the Headers, Preview, Response, Cookies and Timing tabs on the right. You'll want to look up the information in the Headers, Preview and Response tabs. Additionally, if you find an image you're interested in, you can also double-click the name on the left and see where that leads.

There are some other tricks, but at the very least, this should give you some ammunition to start your troubleshooting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜