开发者

Prevent web page copying method

I was completely facinated when I discovered BRW's (example) method to prevent web page copying. I had a quick look through the source view and couldn't see how they did it. Aside from inserting (c) sy开发者_Go百科mbols through out the text, they also scramble the text yet it is completely readable through a browser. Amazing!

Any ideas how they did it?


If you view the source, you will notice that its a boatload of <i> and <span> elements littered in the source (some of which are hidden by indenting them -10000 to the left). However, a simple scraper with a tiny bit of logic could easily undo that travesty.

Sure, it will prevent casual copy and paste, but is downright dumb, plus makes you pretty much ungoogleable.


They overlay/insert invisible text spans (through CSS: text-indent: -100000px) that browsers usually still copy and paste, resulting in too much copied text. You need to parse the CSS to determine what is readable (try lynx -- bad text)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜