By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,051 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,051 IT Pros & Developers. It's quick & easy.

header catcher

P: n/a
is there a browser which can log what headers send or receive?

I have many images in my page which returned with eg: index.php?image1.png

I saw, when I use directly link:
<img src=image1.jpg>
browser never reloads image (caching) but when I use php link
<img src="index.php?image1.jpg">
browser always reload the image

why?
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hello,

- Chameleon - wrote:
is there a browser which can log what headers send or receive?
I don't know about this one.
I saw, when I use directly link:
<img src=image1.jpg>
browser never reloads image (caching) but when I use php link
<img src="index.php?image1.jpg">
browser always reload the image


Maybe the browser uses a conditional GET, so maybe
the request from browser to server contains an additional
HTTP header that tells the server to only return the content
of a file if it was modified after this and that datetime.

In case of non-static content, like a PHP script,
I can imagine that such headers are ignored
and the script is always executed, because it doesn't make
much sense for the server to check the modification datetime
of the PHP script. So perhaps you have to check this special
header yourself from the PHP script and, if the image file
didn't change, you return a different status to the browser.

Sorry for not giving you exact data, I don't know the names
of the headers and the status codes out of the top of my head,
but you can find them in the HTTP specification.

Best regards,

Eric
Jul 17 '05 #2

P: n/a
On Fri, 24 Oct 2003 18:38:35 +0300, "<- Chameleon ->"
<ch******@hotmail.NOSPAM.com> scrawled:
is there a browser which can log what headers send or receive?

I have many images in my page which returned with eg: index.php?image1.png

I saw, when I use directly link:
<img src=image1.jpg>
browser never reloads image (caching) but when I use php link
<img src="index.php?image1.jpg">
browser always reload the image

why?


Look up Last-modified and E-tag headers - a combination of these can achive
what you want... Plus use path info to get rid of the "?" i.e.

/index.php/image1.png rather than ?image1.png and use
$_REQUEST['PATH_INFO'] to pass the info...

Jul 17 '05 #3

P: n/a
"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message news:<bn**********@nic.grnet.gr>...
is there a browser which can log what headers send or receive?
I heard that Firebird do so.
I have many images in my page which returned with eg: index.php?image1.png

I saw, when I use directly link:
<img src=image1.jpg>
browser never reloads image (caching) but when I use php link
<img src="index.php?image1.jpg">
browser always reload the image

why?


I think, it is because in your PHP file you have used passed
"no-cache" or last modified headers.

---
"He who created the god was a fool; he who spreads his name is a
scoundrel and he who worships him is a barbarian."---Periyar, Famous
Tamil Rationalist
Email: rrjanbiah-at-Y!com
Jul 17 '05 #4

P: n/a
"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message news:<bn**********@nic.grnet.gr>...
is there a browser which can log what headers send or receive?


http://www.httpwatch.com/ - IE addon

http://www.rexswain.com/httpview.html - HTTP Viewer

---
"He who created the god was a fool; he who spreads his name is a
scoundrel and he who worships him is a barbarian."---Periyar, Famous
Tamil Rationalist
Email: rrjanbiah-at-Y!com
Jul 17 '05 #5

P: n/a
ng**********@rediffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<ab**************************@posting.google. com>...
"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message news:<bn**********@nic.grnet.gr>...
is there a browser which can log what headers send or receive?


http://www.httpwatch.com/ - IE addon

http://www.rexswain.com/httpview.html - HTTP Viewer


Just tried HTTPLook (http://www.httpsniffer.com/ ). And
definitely it is the winner. Sniffs great with IE, Yahoo Messenger,
etc. And it is very good.

---
"Success = 10% sweat + 90% tears"
Email: rrjanbiah-at-Y!com
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.