开发者

Detect if a web request is the result of an <img src=""> tag

开发者 https://www.devze.com 2023-01-14 14:55 出处:网络
If you have <img src=\"\"> on your page, the image load will result in another web request to the page that was originally loaded.Is there a way (in ASP.NET) to detect that the web request was t

If you have <img src=""> on your page, the image load will result in another web request to the page that was originally loaded. Is there a way (in ASP.NET) to detect that the web request was the result of being loaded for an <img> tag like this?

The only differ开发者_如何学JAVAence I can find is the HTTP_ACCEPT value of */* for <IMG> requests, vs. a limited HTTP_ACCEPT value for the actual page request. I am fearful that will be too restrictive though.


dont know about built in function, but you can pass some query string parameter from src="..." url, and detect that parameter in the page load event of requested page.

0

精彩评论

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