header catcher

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    header catcher

    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?image 1.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?


  • Eric Veltman

    #2
    Re: header catcher

    Hello,

    - Chameleon - wrote:
    [color=blue]
    > is there a browser which can log what headers send or receive?[/color]

    I don't know about this one.
    [color=blue]
    > 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[/color]

    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

    Comment

    • James

      #3
      Re: header catcher

      On Fri, 24 Oct 2003 18:38:35 +0300, "<- Chameleon ->"
      <cham_gss@hotma il.NOSPAM.com> scrawled:
      [color=blue]
      >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?image 1.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?[/color]

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

      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: header catcher

        "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message news:<bnbkco$75 d$1@nic.grnet.g r>...[color=blue]
        > is there a browser which can log what headers send or receive?[/color]

        I heard that Firebird do so.
        [color=blue]
        > I have many images in my page which returned with eg: index.php?image 1.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?[/color]

        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

        Comment

        • R. Rajesh Jeba Anbiah

          #5
          Re: header catcher

          "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message news:<bnbkco$75 d$1@nic.grnet.g r>...[color=blue]
          > is there a browser which can log what headers send or receive?[/color]

          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

          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: header catcher

            ng4rrjanbiah@re diffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<abc4d8b8. 0311030354.79d3 9022@posting.go ogle.com>...[color=blue]
            > "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message news:<bnbkco$75 d$1@nic.grnet.g r>...[color=green]
            > > is there a browser which can log what headers send or receive?[/color]
            >
            > http://www.httpwatch.com/ - IE addon
            >
            > http://www.rexswain.com/httpview.html - HTTP Viewer[/color]

            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

            Comment

            Working...