Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-30 Thread Jean-Christian Imbeault

First off thanks for all the help!

Chris Shiflett wrote:
> 
> Sorry, I thought you were interested in the difference in behavior 
> between your Netscape 7 and IE.

Actually I am interested in knowing why the View Info Page| Media tab 
says my jpg is cached but my jpg is not ...

 > If you just want to allow caching, try header("Cache-Control:
> public").

Great. I'll do that!

> Also, you are speaking about images but showing the HTTP transaction 
> used to retrieve the HTML. You will want to examine the HTTP transaction 
> used to fetch the image itself in order to analyze the caching behavior 
> of your browser with respect to that image.

I gave the whole HTTP headers in a msg in this thread just a few minutes 
ago ... talking about a bug in N7 with jpg's and gif's.

> For images, unless you are generating them in PHP, it's going to be a 
> Web server configuration to change any headers.

Oh ... whould you know which one for Apache? It seems that gifs are not 
being cached whereas jpegs are.

> This all may make little sense, as it is extremely late here (east coast 
> US). If it confuses more than helps, just ignore it. :-)

Nope, you've been a great help so far!

I now know:

1- which header to use to turn caching on
2- that there is a problem between caching of jpeg's and gif's

I know have to f
 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "3243237953";
google_color_border = "CE9689";
google_color_bg = ["FF","ECE5DF"];
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







[PHP] N7: Media (Page Info Tab) contents not cached bug?
Jean-Christian Imbeault


Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?
Chris Shiflett


Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?
Jean-Christian Imbeault


Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?
Chris Shiflett


Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?
Jean-Christian Imbeault











 






  
  





Reply via email to



  
  





 
 







Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Chris Shiflett

Jean-Christian Imbeault wrote:

> I did as you suggested and hit the refresh button on N7. The .gif did 
> *not* display. I guess that is the proper behaviour?


Hmmm. Only if the image referenced in the HTML did not exist. It should 
have simply fetched the fresh resource (image).

> I know the browser probably checked with the server to see if the php 
> page was still valid (and found it was), but do browsers normally 
> check to see if the images in the HTML are still valid too? 


When a browser discovers an image tag in the HTML document, it issues a 
separate request for the image. It is exactly the same as if you had 
typed in the URL to the image in your browser's location bar. As far as 
caching is concerned, the type of content (text, html, image, etc.) does 
not affect caching. There are specific headers that do that.

> Either way that does not answer my question as to wether the image had 
> been cached in the first place. All I know is that the browser did not 
> use a cached copy of the image (possibly because the server told it 
> the gif was no longer available).
>
> How can I test that the image *was* cached, *and* that the cached copy 
> is used when it the server's version has no been changed? 


The only way to be certain would be to view the HTTP communication 
between your browser and the Web server. Do you have a way to do this? 
My guess is that the browser will issue a request for the image anyway, 
but the server's response is a 304 Not Modified or whatever.

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Jean-Christian Imbeault

Chris Shiflett wrote:
> 
> To test this, try changing the image source (on your server) and request 
> the page again. If Netscape fetches the fresh resource, this might be 
> it. If you see the same image as before, then there is definitely a 
> problem somewhere.

I did as you suggested and hit the refresh button on N7. The .gif did 
*not* display. I guess that is the proper behaviour?

The php page was not changed, just the gif.

I know the browser probably checked with the server to see if the php 
page was still valid (and found it was), but do browsers normally check 
to see if the images in the HTML are still valid too?

Either way that does not answer my question as to wether the image had 
been cached in the first place. All I know is that the browser did not 
use a cached copy of the image (possibly because the server told it the 
gif was no longer available).

How can I test that the image *was* cached, *and* that the cached copy 
is used when it the server's version has no been changed?

Thansk again!

Jc



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Chris Shiflett

I do not know the answer to your question for certain, but perhaps it 
has to do with the Cache-Control HTTP header. This header has a 
directive called "no-cache" which allows caching but requires that the 
cached copy be revalidated each time.

To test this, try changing the image source (on your server) and request 
the page again. If Netscape fetches the fresh resource, this might be 
it. If you see the same image as before, then there is definitely a 
problem somewhere.

Sometimes caches are used in this way to cut down on traffic without 
avoiding interaction with the origin server. Basically, the origin 
servers gets final say so to speak as to whether the cached copy is 
still valid, rather than the cache deciding on its own. This is 
extremely common in practice.

Maybe that provides a possible explanation.

Chris

Jean-Christian Imbeault wrote:

> When using the View|Page Info Menu item I get a nice tabbed window 
> showing information for the page I just loaded. Clicking the Media tab 
> shows what contents the page needed and importantly whether the 
> contents are cached or not.
>
> If I load .php pages I am developing off a local server 
> (http://192.168... not accessible from the internet) I see that in the 
> Media tab the "Source" for the gif/jpeg's on my page is listed as 
> "(not cached)" ... but if I look in the cache folder the files are 
> there ...
>
> I only see this problem with my local .php pages. I do not have the 
> problem with IE. I do not see this problem if I access .php files on 
> the public Internet.
>
> Does N7 have a problem caching files from private (192.168...) networks?
>
> Or is N7 really caching the files and there is a problem with the 
> Media (Page Info Tab) in that is incorrectly stating that media has 
> not been cached when it has?
>
> Is this a setting in PHP, N7, or Apache I need to change? 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Jean-Christian Imbeault

When using the View|Page Info Menu item I get a nice tabbed window 
showing information for the page I just loaded. Clicking the Media tab 
shows what contents the page needed and importantly whether the contents 
are cached or not.

If I load .php pages I am developing off a local server 
(http://192.168... not accessible from the internet) I see that in the 
Media tab the "Source" for the gif/jpeg's on my page is listed as "(not 
cached)" ... but if I look in the cache folder the files are there ...

I only see this problem with my local .php pages. I do not have the 
problem with IE. I do not see this problem if I access .php files on the 
public Internet.

Does N7 have a problem caching files from private (192.168...) networks?

Or is N7 really caching the files and there is a problem with the Media 
(Page Info Tab) in that is incorrectly stating that media has not been 
cached when it has?

Is this a setting in PHP, N7, or Apache I need to change?

This is really worrying me so any comments appreciated!

Jc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php