Cache header

  1. what does this header do?

    header(“Pragma: private, no-cache”);
    header(“Cache-Control: private, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0”);

I did google it and if understood correctly, it does cache but enforce to check if something has been changed, right? or it just prevents any cache? Is it good to keep as it is, or is there any better way? I mean isn’t it old-fashioned now?

  1. On target server for RESTApi which one should be used?

On RESTApi target server no session is started, so this function cannot be used, which header should be used on RESTApi target server?

Is it safe or good idea to use both Pragma and Cache-Control on RESTApi response server?
or how is best recommended for such purpose?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.