---
title: "Find Out the URL of the webpage that image resides on"  
description: "Find Out the URL of the webpage that image resides on"  
author: "Anonymous User"  
published: 2014-12-08  
updated: 2014-12-08  
canonical: https://www.mindstick.com/forum/12763/find-out-the-url-of-the-webpage-that-image-resides-on  
category: "asp.net"  
tags: ["webforms"]  
reading_time: 2 minutes  

---

# Find Out the URL of the webpage that image resides on

I would like to make a 1 [pixel](https://www.mindstick.com/interview/33859/how-to-create-pixel-counter-in-javascipt) [image](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) that will reside on the [html](https://www.mindstick.com/articles/1530/design-a-simple-stylish-calculator-using-html-css-and-javascript) page to track [page activity](https://www.mindstick.com/forum/34220/can-anyone-explain-me-about-off-page-activity) I have a page http:/domain.com/mypage.htm and I want to add <img src='http://www.test.com/myimage.aspx' /> somewhere in its body

When page is triggered I [render](https://www.mindstick.com/interview/2205/why-we-need-a-separate-mobile-project-template-while-we-can-render-our-web-application-in-mobile-what-s-new-in-mvc-4-mobile-template) an one pixel [transparent](https://www.mindstick.com/forum/1784/wpf-webbrowser-on-transparent-window) image. I'm having an issue finding out the URL of the page that image is on. HTTP_REFERER [header](https://www.mindstick.com/articles/336036/explain-about-html-header-body-and-footer-tags) [carrier](https://answers.mindstick.com/qa/62201/which-country-has-recently-launched-soyuz-carrier-rocket-with-33-satellites) the true referer of the page, and HTTP_HOST carries the URL of the image itself.

Is there a way to find out the HTML page URL that the image is on?

## Replies

### Reply by Lillian Martin

You can analysis the request headers of myimage.aspx, the Referer header is the HTML page URL you're looking for. Besides, I suggest adding a timestamp with the <img> src link, like this:

```
<img src="http://www.test.com/myimage.aspx?t=1234567890" />
```

So that every time you refresh the HTML page, the browser invoke a new request to the image.

### Reply by Anurag Sharma

If you can't find it on any http header, you can always send some information like <img src='http://www.test.com/myimage.aspx?[page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page)=mypage' />.

If you can use javascript though, you don't need to display an image, use an ajax request instead.


---

Original Source: https://www.mindstick.com/forum/12763/find-out-the-url-of-the-webpage-that-image-resides-on

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
