Is there a wap version of your site?
N7: Media (Page Info Tab) contents not cached bug?
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > PHP web-programming > N7: Media (Page Info Tab) contents not cached bug? 30 September 2002 10:40:55

  Top users: 
  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

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

Jean-Christian Imbeault 30 September 2002 08:33:33
 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


Add comment
Chris Shiflett 30 September 2002 09:00:03 permanent link ]
 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


Add comment
Jean-Christian Imbeault 30 September 2002 09:20:54 permanent link ]
 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


Add comment
Jean-Christian Imbeault 30 September 2002 09:32:43 permanent link ]
 Here's the HTTP header received. As you can see some header force no
caching ... I have no idea how they got set. How can I set them properly ...

HTTP/1.1 200 OK
Date: Sun, 29 Sep 2002 06:28:34 GMT
Server: Apache/1.3.26 (Unix) PHP/4.2.3 mod_ssl/2.8.9 OpenSSL/0.9.6d
X-Powered-By: PHP/4.2.3
Set-Cookie: PHPSESSID=cab8bc2f2­5f27aeb9ba0f0bbbd07b­bc1; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html

Jc


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


Add comment
Chris Shiflett 30 September 2002 09:33:09 permanent link ]
 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


Add comment
Jean-Christian Imbeault 30 September 2002 09:43:13 permanent link ]
 Chris Shiflett wrote:>
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, >> pre-check=0>
This is the one I'm talking about. The "no-store" directive is the one > ignored by IE. Is this the HTTP response generated after you added the > header("Cache-Contr­ol: no-cache") in your code?

No, I have no changed my PHP code yet. I was hoping I could set this in
Apache since it is basically a setting I want on all my pages.

Cache-Control: no-cache>
If you are unable to change this, it is definitely something that needs > to be fixed in PHP.

I'll change my code now and see what the header becomes.

Just to make sure header("Cache-Contr­ol: no-cache") will cause the
browser to cache the content?

Jc


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


Add comment
Chris Shiflett 30 September 2002 09:43:27 permanent link ]
 Jean-Christian Imbeault wrote:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, > pre-check=0


This is the one I'm talking about. The "no-store" directive is the one
ignored by IE. Is this the HTTP response generated after you added the
header("Cache-Contr­ol: no-cache") in your code? I was thinking it would
override this header to make it simply:

Cache-Control: no-cache

If you are unable to change this, it is definitely something that needs
to be fixed in PHP.

Chris


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


Add comment
Jean-Christian Imbeault 30 September 2002 09:50:09 permanent link ]
 I changed my code and added

header("Cache-Contr­ol: no-cache");

The header has now become:

HTTP/1.1 200 OK
Date: Sun, 29 Sep 2002 06:42:14 GMT
Server: Apache/1.3.26 (Unix) PHP/4.2.3 mod_ssl/2.8.9 OpenSSL/0.9.6d
X-Powered-By: PHP/4.2.3
Set-Cookie: PHPSESSID=4485fda29­813ac67c38094e8c07ac­90d; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Connection: close
Content-Type: text/html


However N7 still says (in the Media Bar (from view Page Info)) that the
contents are not cached ...

Maybe a bug in N7? Though I don't think so since it obviously caches
pages when I surf the net ....

I'll try testing with a really large gif to see if it get's cached or
reload from my server.

Jc


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


Add comment
Jean-Christian Imbeault 30 September 2002 10:40:55 permanent link ]
 I did the following test:

1- in N7 I opened an html file located on a remote server containing one
large jpeg and one large gif file. The load time was about 3 secs.

2- I closed the browser

3- I opened the browser and reloaded the same file. The load time was
0.5 secs. Obviously the two images were cached.

The Media Info tab said the gif was not cached but obviously it was very
wrong.

Ergo, bug in N7 ...

Thanks for all the info that helped me pin this down!

Jc


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


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > PHP web-programming > N7: Media (Page Info Tab) contents not cached bug? 30 September 2002 10:40:55

see also:
Primary keys for companies and people
pass tests:
Do you know women?
Trix
see also:
segodnia i lehy v tyrsiu!B-)
veserinka v hest registrasii nahoi ...
main semia

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .