Re: Does PHP do this differently?



On 31 Oct, 01:17, Bill H <b...@xxxxxxxxx> wrote:
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?


You need to get in place the tools to answer this question yourself
(wireshark springs to mind). Yes - in a default config it should do
this. You can define from the PHP code how the browser should handle
caching. But a better solution would be to to have the images served
up by no-cache handler which does a temporary redirect to a cacheable/
non-cacheable image.

C.
.



Relevant Pages

  • Re: Does PHP do this differently?
    ... Bill H schreef: ... through a script running on the website server. ... I quickly realized that flash was showing me cached images so I added: ... file and stream it out with the correct headers and it works fine. ...
    (comp.lang.php)
  • Re: PHP online drawing program
    ... > For a very specific service, I have created a PHP script that uses the GD ... I have no idea however how I can make a simple online drawing ... You may also want to consider Flash. ...
    (comp.lang.php)
  • Re: [PHP] setcookie
    ... As a dirty trick you can put following line on the top of your script, ... I am learning PHP, I am trying to set a simple cookie: ... Cannot modify header information - headers already sent by ... setcookie() defines a cookie to be sent along with the rest of the HTTP ...
    (php.general)
  • Re: Life time of a Initialized object
    ... I have a php page - I guess you call them "headers" that has at the top ... means that a new script is ... Please don't top-post and please don't send HTML postings, ... An insult about your PHP competence would have suited you just fine. ...
    (comp.lang.php)
  • Re: sending flash variable to php file
    ... want to call this search engine from flash with action script... ... If want Flash to receive back the somthing from the php script ... > // check for an empty string and display a message. ...
    (alt.php)