Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. prevent to copy my web pge

prevent to copy my web pge

Scheduled Pinned Locked Moved ASP.NET
help
11 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Elham M
    wrote on last edited by
    #1

    Hi, I have web page that has useful information on it but I don't want any user copy this information or add my logo if user copy this.please help me

    B 1 Reply Last reply
    0
    • E Elham M

      Hi, I have web page that has useful information on it but I don't want any user copy this information or add my logo if user copy this.please help me

      B Offline
      B Offline
      Bernhard Hiller
      wrote on last edited by
      #2

      You can't. You can make it complicated, but you cannot fully prevent a user from copying the contents.

      E R 2 Replies Last reply
      0
      • B Bernhard Hiller

        You can't. You can make it complicated, but you cannot fully prevent a user from copying the contents.

        E Offline
        E Offline
        Elham M
        wrote on last edited by
        #3

        So, how can I complicate it ? can I Add logo of my site in a back ground or some thing like this when they copy this data the logo appear on it?

        S 1 Reply Last reply
        0
        • E Elham M

          So, how can I complicate it ? can I Add logo of my site in a back ground or some thing like this when they copy this data the logo appear on it?

          S Offline
          S Offline
          StianSandberg
          wrote on last edited by
          #4

          It's impossible to prevent someone from taking a screenshot ;) So if you embed your image as base64, split up the base64-string in variables and spread it around in a bunch of js-files, it's still easy to copy your logo.

          -------------------- When Chuck Norris' dreams come true, your worst nightmares begin.

          E 1 Reply Last reply
          0
          • S StianSandberg

            It's impossible to prevent someone from taking a screenshot ;) So if you embed your image as base64, split up the base64-string in variables and spread it around in a bunch of js-files, it's still easy to copy your logo.

            -------------------- When Chuck Norris' dreams come true, your worst nightmares begin.

            E Offline
            E Offline
            Elham M
            wrote on last edited by
            #5

            That's a good idea thanks :) but can you give me an example of it , write some code please

            S 1 Reply Last reply
            0
            • E Elham M

              That's a good idea thanks :) but can you give me an example of it , write some code please

              S Offline
              S Offline
              StianSandberg
              wrote on last edited by
              #6

              code to base64 encode and split it? You can do it. I'll give you a few tips: Online tool for converting images to base64 embedded image: http://webcodertools.com/imagetobase64converter/[^] This will give you an img-tag ready to use. Example (using jQuery):

              I removed most of the string for it to be easier to read. They are usually very long Then you take the base64 value "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf89hAAAAB3RJTUUH2AQPB0tAAAAARnQU1", put it in a javascript variable (or multiple) like this:

              var part1 = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAA';
              var part2 = 'QCAYAAAAf89hAAAA';
              var part3 = 'B3RJTUUH2AQPB0';
              var part4 = 'tAAAAARnQU1';
              // you can name these variables something different
              // and put them in different js-files making them more difficult to find.

              Remove the src-attribute value from your img-tag and give it an id-attribute

              // load the image like this
              $(document).ready(function(){
              var base64src = 'data:image/png;base64,' + part1 + part2 + part3 +part4;
              $('#myImg').attr('src', base64src);
              });

              This will NOT prevent a user from copying your image! It's (as I said) easy to do a screenshot...

              -------------------- When Chuck Norris' dreams come true, your worst nightmares begin.

              E 1 Reply Last reply
              0
              • S StianSandberg

                code to base64 encode and split it? You can do it. I'll give you a few tips: Online tool for converting images to base64 embedded image: http://webcodertools.com/imagetobase64converter/[^] This will give you an img-tag ready to use. Example (using jQuery):

                I removed most of the string for it to be easier to read. They are usually very long Then you take the base64 value "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf89hAAAAB3RJTUUH2AQPB0tAAAAARnQU1", put it in a javascript variable (or multiple) like this:

                var part1 = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAA';
                var part2 = 'QCAYAAAAf89hAAAA';
                var part3 = 'B3RJTUUH2AQPB0';
                var part4 = 'tAAAAARnQU1';
                // you can name these variables something different
                // and put them in different js-files making them more difficult to find.

                Remove the src-attribute value from your img-tag and give it an id-attribute

                // load the image like this
                $(document).ready(function(){
                var base64src = 'data:image/png;base64,' + part1 + part2 + part3 +part4;
                $('#myImg').attr('src', base64src);
                });

                This will NOT prevent a user from copying your image! It's (as I said) easy to do a screenshot...

                -------------------- When Chuck Norris' dreams come true, your worst nightmares begin.

                E Offline
                E Offline
                Elham M
                wrote on last edited by
                #7

                I did it but it doesn't different between your code and add image as background , I want when user copy my text in a web page and paste it on word both text and logo paste

                S 1 Reply Last reply
                0
                • E Elham M

                  I did it but it doesn't different between your code and add image as background , I want when user copy my text in a web page and paste it on word both text and logo paste

                  S Offline
                  S Offline
                  StianSandberg
                  wrote on last edited by
                  #8

                  Isn't your question about preventing this?

                  -------------------- When Chuck Norris' dreams come true, your worst nightmares begin.

                  1 Reply Last reply
                  0
                  • B Bernhard Hiller

                    You can't. You can make it complicated, but you cannot fully prevent a user from copying the contents.

                    R Offline
                    R Offline
                    RamShankarMCA
                    wrote on last edited by
                    #9

                    Did you mean, you want the users to avoid following things 1) Dont save your page 2) avoid right click and ctrl+c

                    E 1 Reply Last reply
                    0
                    • R RamShankarMCA

                      Did you mean, you want the users to avoid following things 1) Dont save your page 2) avoid right click and ctrl+c

                      E Offline
                      E Offline
                      Elham M
                      wrote on last edited by
                      #10

                      yes exactly, or if user copy my page also my logo paste on it

                      P 1 Reply Last reply
                      0
                      • E Elham M

                        yes exactly, or if user copy my page also my logo paste on it

                        P Offline
                        P Offline
                        Pete OHanlon
                        wrote on last edited by
                        #11

                        You can't do this I'm afraid. If the user turns off JavaScript, your page is purely the content and the user can copy it as they like.

                        *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups