prevent to copy my web pge
-
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
You can't. You can make it complicated, but you cannot fully prevent a user from copying the contents.
-
You can't. You can make it complicated, but you cannot fully prevent a user from copying the contents.
-
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?
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.
-
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.
-
That's a good idea thanks :) but can you give me an example of it , write some code please
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.
-
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.
-
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
Isn't your question about preventing this?
-------------------- When Chuck Norris' dreams come true, your worst nightmares begin.
-
You can't. You can make it complicated, but you cannot fully prevent a user from copying the contents.
Did you mean, you want the users to avoid following things 1) Dont save your page 2) avoid right click and ctrl+c
-
Did you mean, you want the users to avoid following things 1) Dont save your page 2) avoid right click and ctrl+c
-
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