1

i was loading a url content in an iframe. so now the url information are automatically downloaded in to users temp folder. i have already used the below code:

<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">

how to avoid caching for all browsers? how to avoid url caching when it is loaded in iframe?

need ur suggestions with examples..

101084_see
  • 37
  • 1
  • 6
  • Possible duplicate to http://stackoverflow.com/questions/2648053/preventing-iframe-caching-in-browser – Eduard Dec 01 '11 at 14:49

2 Answers2

0
// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);

// Stop Caching in Firefox
Response.Cache.SetNoStore();

The following response headers are added by these statements:

Cache-Control: no-cache, no-store Pragma: no-cache

also read this i found it in asp.net forums:

Use the following tags inside head tag of your page.

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

Both the above tags should be included if you are not sure if server is HTTP/1.1 compliant. Also Include:-

<META HTTP-EQUIV="EXPIRES" 
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">  tells the server which cache the page to expire the page in given time interval. An invalid interval like "0" or "-1" expires it immediately and causes a fetch of latest version of file, each time request is made.

you can get complete info at this link :- http://www.i18nguy.com/markup/metatags.html
Kemal Can Kara
  • 416
  • 2
  • 15
0

the no-cache directive causes the browser to request the content every time the page loads. That's not the same thing as preventing it from downloading.

It doesn't sound like you are trying to avoid caching, rather you are trying to avoid saving downloaded files to the local file system. The no-store is the way to accomplish this as you found, but it does not mean that the browser cannot store, rather it must make a "best effort" to avoid storing the files in non-volatile storage.

I don't know if any browsers support this without temporarily storing files - I couldn't find any support charts.

Matt H
  • 6,422
  • 2
  • 28
  • 32