Prevent client image caching

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SmVmZiBCZWVt?=

    Prevent client image caching

    I'm working on a litigation web app where users will review images of case
    documents. One of the requirements is that we either prevent the images from
    being cached on the clients machine (in temp directory or anywhere else) or
    we encrypt the images somehow. I'm guessing that encryption will not work,
    but is there a way to prevent caching?

    Also, is there a way to prevent printing on a current page? We're already
    not showing the menu or toolbar, but is there any way to disable hotkeys
    (Shift+P)?

    Thanks in advance,

    J. Beem
  • Alexey Smirnov

    #2
    Re: Prevent client image caching

    On May 5, 10:02 pm, Jeff Beem <JeffB...@discu ssions.microsof t.com>
    wrote:
    I'm working on a litigation web app where users will review images of case
    documents. One of the requirements is that we either prevent the images from
    being cached on the clients machine (in temp directory or anywhere else) or
    we encrypt the images somehow. I'm guessing that encryption will not work,
    but is there a way to prevent caching?
    >
    Also, is there a way to prevent printing on a current page? We're already
    not showing the menu or toolbar, but is there any way to disable hotkeys
    (Shift+P)?
    >
    Thanks in advance,
    >
    J. Beem
    http://.....gif?random_num would probably help

    Comment

    • gover

      #3
      Re: Prevent client image caching

      There arre HTTP Headers that can be used to prevent caching, You could also
      use some css classes to hide data when a page was printed via the browsers
      print function.
      However,you cant stop the user from preesing the windows printscreen button
      to get an image of whats on the sceen..
      "Jeff Beem" <JeffBeem@discu ssions.microsof t.comwrote in message
      news:5C67A962-FB09-400B-8275-6F0861F1DC09@mi crosoft.com...
      I'm working on a litigation web app where users will review images of case
      documents. One of the requirements is that we either prevent the images
      from
      being cached on the clients machine (in temp directory or anywhere else)
      or
      we encrypt the images somehow. I'm guessing that encryption will not
      work,
      but is there a way to prevent caching?
      >
      Also, is there a way to prevent printing on a current page? We're already
      not showing the menu or toolbar, but is there any way to disable hotkeys
      (Shift+P)?
      >
      Thanks in advance,
      >
      J. Beem

      Comment

      • Eliyahu Goldin

        #4
        Re: Prevent client image caching

        Yes, it will.

        If you make image urls on server side, you can use Random class.

        If you make them on client side, you can use (new Date()).getMill iseconds()
        as a sort of a random numer generator.

        --
        Eliyahu Goldin,
        Software Developer & Consultant
        Microsoft MVP [ASP.NET]




        "Alexey Smirnov" <alexey.smirnov @gmail.comwrote in message
        news:1178397882 .357422.146670@ h2g2000hsg.goog legroups.com...
        On May 5, 10:02 pm, Jeff Beem <JeffB...@discu ssions.microsof t.com>
        wrote:
        >I'm working on a litigation web app where users will review images of
        >case
        >documents. One of the requirements is that we either prevent the images
        >from
        >being cached on the clients machine (in temp directory or anywhere else)
        >or
        >we encrypt the images somehow. I'm guessing that encryption will not
        >work,
        >but is there a way to prevent caching?
        >>
        >Also, is there a way to prevent printing on a current page? We're
        >already
        >not showing the menu or toolbar, but is there any way to disable hotkeys
        >(Shift+P)?
        >>
        >Thanks in advance,
        >>
        >J. Beem
        >
        http://.....gif?random_num would probably help
        >

        Comment

        • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

          #5
          RE: Prevent client image caching

          Unfortunately, I have found that (at least with Internet Exploder) virtually
          every combination of no-cache headers and random querystrings on the image
          url still result in the image going into the Temporary Internet Files folder
          immediately upon the page having completed loading.

          While it may disappear later after the browser is closed, there is nothing
          to stop a user from choosing Tools/Internet Options /Settings /View Files to
          be able to copy this image out of the folder and save it somewhere else.

          Try some combinations and let us know if I am correct in this.

          Peter

          --
          Site: http://www.eggheadcafe.com
          UnBlog: http://petesbloggerama.blogspot.com
          Short urls & more: http://ittyurl.net




          "Jeff Beem" wrote:
          I'm working on a litigation web app where users will review images of case
          documents. One of the requirements is that we either prevent the images from
          being cached on the clients machine (in temp directory or anywhere else) or
          we encrypt the images somehow. I'm guessing that encryption will not work,
          but is there a way to prevent caching?
          >
          Also, is there a way to prevent printing on a current page? We're already
          not showing the menu or toolbar, but is there any way to disable hotkeys
          (Shift+P)?
          >
          Thanks in advance,
          >
          J. Beem

          Comment

          • MasterGaurav \(www.edujini-labs.com\)

            #6
            Re: Prevent client image caching

            Unfortunately, I have found that (at least with Internet Exploder)
            virtually
            every combination of no-cache headers and random querystrings on the image
            url still result in the image going into the Temporary Internet Files
            folder
            immediately upon the page having completed loading.
            I second.
            The only way out it http://someserver.com/image.jpg?{Date Time.Now.Ticks}

            just to fool the browser that it's a new image...


            --
            Happy Hacking,
            Gaurav Vaish | www.mastergaurav.com


            -----------------------------------------


            Comment

            • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

              #7
              Re: Prevent client image caching

              Correct, but even in that case if you open the temporary files folder you can
              see the image there along with the ?xxxxx querystring item from the url. The
              idea here from the OP is "How to completely prevent" an image in a web page
              from EVER getting into the cache folder.
              Peter

              --
              Site: http://www.eggheadcafe.com
              UnBlog: http://petesbloggerama.blogspot.com
              Short urls & more: http://ittyurl.net




              "MasterGaur av (www.edujini-labs.com)" wrote:
              Unfortunately, I have found that (at least with Internet Exploder)
              virtually
              every combination of no-cache headers and random querystrings on the image
              url still result in the image going into the Temporary Internet Files
              folder
              immediately upon the page having completed loading.
              >
              I second.
              The only way out it http://someserver.com/image.jpg?{Date Time.Now.Ticks}
              >
              just to fool the browser that it's a new image...
              >
              >
              --
              Happy Hacking,
              Gaurav Vaish | www.mastergaurav.com


              -----------------------------------------
              >
              >
              >

              Comment

              • Alexey Smirnov

                #8
                Re: Prevent client image caching

                On May 6, 5:20 pm, Peter Bromberg [C# MVP]
                <pbromb...@yaho o.yabbadabbadoo .comwrote:
                Correct, but even in that case if you open the temporary files folder you can
                see the image there along with the ?xxxxx querystring item from the url. The
                idea here from the OP is "How to completely prevent" an image in a web page
                from EVER getting into the cache folder.
                Peter
                >
                --
                Site: http://www.eggheadcafe.com
                UnBlog: http://petesbloggerama.blogspot.com
                Short urls & more: http://ittyurl.net
                >
                >
                >
                "MasterGaur av (www.edujini-labs.com)" wrote:
                Unfortunately, I have found that (at least with Internet Exploder)
                virtually
                every combination of no-cache headers and random querystrings on the image
                url still result in the image going into the Temporary Internet Files
                folder
                immediately upon the page having completed loading.
                >
                I second.
                The only way out ithttp://someserver.com/image.jpg?{Date Time.Now.Ticks}
                >
                just to fool the browser that it's a new image...
                >
                --
                Happy Hacking,
                Gaurav Vaish |www.mastergaurav.com


                ------------------------------------------ Hide quoted text -
                >
                - Show quoted text -
                Jeff, sorry, I got it wrong the last time, and "?something " seems to
                be a bad idea.

                Maybe a Flash movie designed to show images could help?

                Comment

                • Tigger

                  #9
                  Re: Prevent client image caching

                  On May 6, 5:02 am, Jeff Beem <JeffB...@discu ssions.microsof t.com>
                  wrote:
                  I'm working on a litigation web app where users will review images of case
                  documents. One of the requirements is that we either prevent the images from
                  being cached on the clients machine (in temp directory or anywhere else) or
                  we encrypt the images somehow. I'm guessing that encryption will not work,
                  but is there a way to prevent caching?
                  >
                  Also, is there a way to prevent printing on a current page? We're already
                  not showing the menu or toolbar, but is there any way to disable hotkeys
                  (Shift+P)?
                  >
                  Thanks in advance,
                  >
                  J. Beem
                  Is it the caching thats the problem or the fact the client can get a
                  copy of the image for their own use?

                  Tigger

                  Comment

                  • MasterGaurav \(www.edujini-labs.com\)

                    #10
                    Re: Prevent client image caching

                    Correct, but even in that case if you open the temporary files folder you
                    can
                    see the image there along with the ?xxxxx querystring item from the url.
                    The
                    idea here from the OP is "How to completely prevent" an image in a web
                    page
                    from EVER getting into the cache folder.
                    Peter
                    You can never prevent the browser's caching through "server".
                    I can always set the option for cache to "Never look on network" and always
                    work with cached image.

                    Yes... one option, as what Alexey suggests is to use Flash or ActiveX or for
                    that matter... any plug-in.


                    --
                    Happy Hacking,
                    Gaurav Vaish | www.mastergaurav.com


                    -----------------------------------------


                    Comment

                    Working...