0

I have a form where I use php to write text to the form, everything works perfect, but most of the time the new texts which are written to the form field does not appear unless I make some way for complete page refresh.

I tried it all on addtext.php

        header("Content-type: text/html");
        header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
        header("Cache-Control: no-store, no-cache, must-revalidate"); 
        header("Cache-Control: post-check=0, pre-check=0", false); 
        header("Pragma: no-cache");
        @session_start();
        ......
       <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
       <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
       <META HTTP-EQUIV="Expires" CONTENT="-1">

from addtext.php so it is to another page

       form action  =addtext2.php?par=randomvalue

But still does not show the updated image, there is another function to cancel and bring on the original image from the original folder that also suffers but with less percentage from the cache issue

How Can I refresh the page and remove all cache

Many Thanks

Techy
  • 2,288
  • 6
  • 35
  • 77
Peter Manoukian
  • 173
  • 1
  • 13

1 Answers1

0

Solution suggested by:

   http://stackoverflow.com/users/2097224/aldanux Worked like a charm, 

   http://stackoverflow.com/questions/728616/disable-cache-for-some-images

many thanks aldanux

Thank you, it worked like a charm: This is the approach:

 <img src = 'myimage.jpg?someparmater=somerandomvaluegeneratedbyphp()'/> 

Worked like a charm, many thanks for your answer (y)

Peter Manoukian
  • 173
  • 1
  • 13