Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Cache problem

  1. #1
    New to the CF scene
    Join Date
    Jul 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cache problem

    Previously the server was standalone and i was able to disable the cache and handle in PHP code... Now when i put the server behind LoadBalancer, all the site pages get cached.. like, say

    when i click edit profile from member page and after editing and submit, i show a success page and redirect back to member page and again if i click it will show the edit page.. it was working fine when the server was out of LoadBalancer. But when i put inside LB, then after first time of editing whenever i click the edit profile the page directly goes to success page and redirects to Member page without showing the edit page...

    How can i fix this ?

    Digits

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    maybe send the headers for no cache?
    try putting this at the top of your code
    Code:
    header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
    header('Pragma: no-cache');
    mmm
    and so I googled a bit and someone posted this article..
    http://www.phpbuilder.com/tips/item.php?id=123

    let us know how it goes.

    edit:
    and found this post that was made:
    http://www.phpbuilder.com/annotate/m...hp3?id=1003107
    Code:
    Subject: 3 lines will handle IE 5.x, Netscape 4.x, etc
    
    header("Cache-Control: private");
    header("Cache-Control: no-cache");
    header("Pragma: no-cache");
    
    That's it.
    Last edited by fci; 10-14-2004 at 08:34 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •