<div dir="auto"><div>Hi All,<div dir="auto"><br></div><div dir="auto">How can I achieve caching html files only for this location context /abc/* and not for other context path.</div><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 14, 2019, 7:26 AM Sathish Kumar <<a href="mailto:satcse88@gmail.com">satcse88@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi Peter,<div dir="auto"><br></div><div dir="auto">Thanks, I am looking for the same solution but to enable only for html files.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 14, 2019, 2:02 AM Peter Booth via nginx <<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Satish,<div><br></div><div>The browser (client-side) cache isn’t related to the nginx reverse proxy cache. You can tell Chrome to not cache html by adding the following to your location definition:</div><div><br></div><div><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;word-wrap:normal;max-height:300px;overflow:auto"><code style="box-sizing:inherit;margin:0px;padding:0px;border:0px;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;max-height:300px;overflow:auto;white-space:normal;background-color:rgba(255,255,255,0)"><font face="UICTFontTextStyleBody">add_header Cache-Control 'no-store';</font></code></pre><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;word-wrap:normal;max-height:300px;overflow:auto"><code style="box-sizing:inherit;margin:0px;padding:0px;border:0px;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;max-height:300px;overflow:auto;white-space:normal;background-color:rgba(255,255,255,0)"><font face="UICTFontTextStyleBody">You can use Developer Tool in Chrome to check that it is working.</font></code></pre><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;word-wrap:normal;max-height:300px;overflow:auto"><code style="box-sizing:inherit;margin:0px;padding:0px;border:0px;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;max-height:300px;overflow:auto;white-space:normal;background-color:rgba(255,255,255,0)"><font face="UICTFontTextStyleBody"><br></font></code></pre><pre style="box-sizing:inherit;margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;word-wrap:normal;max-height:300px;overflow:auto"><code style="box-sizing:inherit;margin:0px;padding:0px;border:0px;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;max-height:300px;overflow:auto;white-space:normal;background-color:rgba(255,255,255,0)"><font face="UICTFontTextStyleBody">Peter</font></code></pre><br><div id="m_-3952992420726244119m_-5503905115471613133AppleMailSignature" dir="ltr">Sent from my iPhone</div><div dir="ltr"><br>On Feb 13, 2019, at 11:56 AM, Sathish Kumar <<a href="mailto:satcse88@gmail.com" rel="noreferrer noreferrer" target="_blank">satcse88@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="auto">Hi All,<div dir="auto"><br></div><div dir="auto">We have Nginx in front of our Application server. We would like to disable caching for html files.</div><div dir="auto"><br></div><div dir="auto">Sample config file:</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">location /abc/ {</div><div dir="auto"> proxy_pass <a href="http://127.0.0.1:8080" rel="noreferrer noreferrer" target="_blank">http://127.0.0.1:8080</a>;</div><div dir="auto"> }</div></div><div dir="auto"><br></div><div dir="auto">We noticed few html files get stored in Chrome local disk cache and would like to fix this issue. Can anybody help, thanks</div></div>
</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>nginx mailing list</span><br><span><a href="mailto:nginx@nginx.org" rel="noreferrer noreferrer" target="_blank">nginx@nginx.org</a></span><br><span><a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></span></div></blockquote></div></div>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" rel="noreferrer noreferrer" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div>
</blockquote></div></div></div>