Re: Clear caché PHP function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You cannot clear the browser cache from PHP.  You have two alternatives.
1.  Use HTTP Headers to expire the content immediately, as well as send
updated timestamp with each generation of the content.
    Example:
    Pragma:no-cache
    Cache-Control:no-store, no-cache, must-revalidate
    Expires: Sun, 01 Jan 2006 00:00:01 GMT
    Date: (((( current date in above format)))))


2.  Add an identifier to the URL, something as simple as a random number or
the time can work.
    Example:
    http://www.example.com/myfile.pdf?time=20081104113700

Cheers

On Tue, Nov 4, 2008 at 11:03 AM, Jean Carlo <jsalas@xxxxxxxxxxxxxxxxxx>wrote:

>   Hi developers,
>
> Does anyone know how clear the cache form a page using php?
>
> I have a pdf class and is changing the data inside all the time, but I have
> to "delete temp files" in IE or "clear caché" In firefox, to see the
> changes, if you guys just put me in the right direction?
>
> Thanks all I really appreciated your help!
>
> Regards, Jean.
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
http://www.skotfred.com/


[Non-text portions of this message have been removed]


------------------------------------

Are you looking for a PHP job? Join the PHP Professionals directory Now!
http://www.phpclasses.org/professionals/Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-objects/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:php-objects-digest@xxxxxxxxxxxxxxx 
    mailto:php-objects-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux