dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: No cache?

  1. #1
    Member
    Join Date
    Jan 2002
    Posts
    96
    How can I prevent my website from caching in the user's computer. It's 100% in Flash. Thanks!

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    Preventing a page from being cached
    There may be occasions when you would want to prevent a page
    from being cached locally on the user's computer, and thus force
    the browser to load a fresh copy each time. One example of this might
    be a webcam which is automatically updated every few seconds - if the
    user visited at a later date, the browser might show them the cached
    (and therefore outdated) version.

    There are in fact three META tag variates which you should use to cause
    this behaviour. This is because they are accepted in different browsers.
    The first, Expires, is actually supposed to specify an expiry date for
    the web page. However, if you leave the value as 0, then it treats it as
    "now", and therefore asks for a new version of the page every time.
    The other two, Pragma and Cache Control, are specifically designed to
    prevent (or control) caching, and should take a value of "no-cache".
    So, to prevent your page being cached in most browsers, you should
    use the following lines:

    <META HTTP-EQUIV="Expires" CONTENT="0">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">

    or

    <meta http-equiv=Cache-Control content=no-cache>
    <meta http-equiv=Pragma content=no-cache>

  3. #3
    Member
    Join Date
    Jan 2002
    Posts
    96
    Thanks for your reply.

    Would you happen to know, how to set it in order to be in cache for like let's say 2 days at a time and then load a new one?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center