Re: Does PHP do this differently?
- From: Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
- Date: Fri, 31 Oct 2008 09:06:02 +0100
Bill H schreef:
I have a flash app that displays a lot of images that are streamed
through a script running on the website server. Originally this script
was in perl and I would load the image into flash using something
like:
/cgi-bin/image.pl?image=1234
I quickly realized that flash was showing me cached images so I added:
/cgi-bin/image.pl?image=1234&somerandomnumber
And all was good. Now I have rewritten the script in php to open the
file and stream it out with the correct headers and it works fine. But
I want to go back to the caching in flash for certain images that
don't change. So I dropped the randomnumber part but still, every
image is loaded, no cached image is shown. Is it possible that php is
sending some "no-cache" header before I send out my content type
headers? If so, how can I disable it?
Bill H
Hi Bill,
If you want to know what a webserver send you, simply inspect the response from that webserver in detail.
An easy way of doing so is:
1) Install Firefox (ver 3)
2) Install a plugin name Webdeveloper (I use version 1.1.6)
The above steps are advisable for every webdeveloper.
Now:
- Put the url of your image in the Locationfield of FF.
- Click on Webdevelopertaskbar Icon INFORMATION --> View Response Headers.
Now you can see all the headers produced by PHP AND your webserver.
Regards,
Erwin Moller
PS: Of course you can do this kind of thing in many other ways, but I prefer using this simple utility because it has many other useful functions too.
--
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
.
- References:
- Does PHP do this differently?
- From: Bill H
- Does PHP do this differently?
- Prev by Date: Re: A question about UDP packet receive
- Next by Date: Re: Does PHP do this differently?
- Previous by thread: Re: Does PHP do this differently?
- Next by thread: Re: Does PHP do this differently?
- Index(es):
Relevant Pages
|