title: How to prevent or avoid Cache in Angular 2 + Applications?
body: <p>I have a situation where i send parameters to an API which in turn generates dynamic pdf &amp; API sends me the path of newly generated file. When i open the file in browser it shows newly generated file, but In my DOM I still see the old file untill &amp; unless i close the browser &amp; hit the API Again. I am previewing the generated pdf file as follows :</p>
  
  <p>TS PART :</p>
  
  <pre><code>this.http.postMethod("report/auditAdmin", data).subscribe((res: any) =&gt; {
          this.toolbar = "#toolbar=0&amp;navpanes=0";
          this.pdfSrc = res.filepath + this.toolbar;
          this.Url = this.sanitizer.bypassSecurityTrustResourceUrl(this.pdfSrc);
        });
  </code></pre>
  
  <p>HTML PART :</p>
  
  <pre><code>&lt;object [data]="Url" type="application/pdf" width="100%" height="1000px"&gt;&lt;/object&gt;
  </code></pre>