Every now and then I come across sites on the Internet that prevent you from copying some or all of the text displayed to the clipboard, or even selecting it in first place using the mouse or keyboard.
I noticed this on a bank's site recently for example where I was not allowed to copy the bank account number to the clipboard.
This guide looks at methods to overcome the limitation put in place by websites on the Internet. But first, why do sites implement these restrictions in first place?
While reasons are provided by companies and individuals who implement the functionality on their web properties, the most likely reason is some form of copy protection.
Method 1: Turn off JavaScript
Most websites use JavaScript to block mouse functionality. If you turn off JavaScript on the site temporarily or even permanently, you will be able to copy text displayed on it using the mouse.
Some websites rely on JavaScript on the other hand which means that you may run into issues doing so. Some may even refuse to display at all when JavaScript is turned off.
Extensions like NoScript can be useful in this regard as they block the execution of scripts as well.
Method 2: The source
Another option that you have is to display the source code of the website you are on. Since it is displayed in a plain text editor it is possible to copy anything from it without restriction.
Simply press Ctrl-u while you are on the site to display its source code. This works in most browsers including Firefox, Chrome and Internet Explorer.
It is still necessary to find the text or content that you are looking for in the source. Use Ctrl-f to jump directly to it.
There you may also find links to images and other contents that you could not save or copy.
Method 3: Extensions and scripts
The third and final option is most suitable if you encounter sites regularly that prohibit right-click use or text copying when you are on them, and if the methods outlined above don't work or are not really suitable.
RightToClick for Firefox disables JavaScript annoyances such as forbidding right-clicks or text selection on sites.
RightToCopy for Chrome offers similar features.
You find numerous extensions for these two browsers that remove annoyances on websites.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.
Disabling javascript can also help in copying/saving images where right click is disabled . I use this method to download images from instagram .
Martin, Thanks for again a really interesting to read and easy to understand article.
Niks is mention this above but not answering all of main question so here is main question to you Martin:
The only question your article leaves me with is or the above mentioned programs and also your guide
to the actions I can follow also works with saving pictures?
I often encounter sites who forbid me to save a/the picture(‘s) from there website so I am wondering
are there outer methods for saving pictures from those sites?
Or is this method working whit who I can save pictures from websites who forbid me to do so?
Yes disabling JavaScript will do that as well, provided that the images are still displayed after you disable it.
You can always view *all* images used in a webpage (except those displayed by plugins like Flash) in Firefox by choosing Tools -> Page Info -> Media tab. This will also allow you to save any images.
Sometimes pressing shift, ctrl or alt is enough.
another method I use,
just create a new bookmark, name it as you want and paste this line as URL :
javascript:void(document.ondragstart=document.body.ondragstart=null,document.oncontextmenu=document.body.oncontextmenu=null,document.onselectstart=document.body.onselectstart=null,document.onclick=null,document.body.onclick=null,document.onmousedown=document.body.onmousedown=null,document.onmouseup=document.body.onmouseup=null,document.onbeforecopy=document.body.onbeforecopy=null,document.onbeforecut=document.body.onbeforecut=null,document.oncopy=document.body.oncopy=null);
usualiy it works well with Firefox, I don’t have to disable javascript, just send the instruction to re-enable features supposed locked on the Web page
Here I’ve bundled two scripts found on the Web into one and built a bookmarklet called whenever a page refuses right-click and/or refuses text copy. I haven’t yet encountered a page where the bookmarklet would be ineffective. Works with Firefox, elsewhere I don’t know.
Bookmarklet’s script : http://pastebin.com/tYiV0UYZ
Copy the script, create a new bookmark, give it as url the script, as name as you wish, call that bookmark on those naughty pages (for those who ignore what a bookmarklet is)
Reenable Right Click.
javascript:/*Anti%20No%20Right%20Click.%20Copyright%20(C)%20CodeHouse.com,%202004*/function%20kill(doc){doc.onmousedown=doc.onmouseup=doc.oncontextmenu=doc.onselectstart=doc.ondragstart=function(){return%20true};if(window.releaseEvents){releaseEvents(Event.MOUSEDOWN|Event.MOUSEUP);}}onerror=function(){return%20true};kill(document);if(frames.length){for(i=0;i<frames.length;++i){kill(frames[i].document);}}else{kill(document);}
I’ve never bothered to use it, but its been in my marklet folder on my toolbar for about 2 years
javascript:function%20kill(d){d.onmousedown=d.onmouseup=d.oncontextmenu=d.onselectstart=d.ondragstart=function(){return%20true;};}try{kill(document);for(var%20j=0;F=frames[j];++j)kill(F.document);}catch(e){}
One method that has never failed me is to take a screenshot.
Works, unless you need the text and not the information. Thanks!
There is a nice tool to convert images to text : Free OCR from http://www.paperfile.net/
Does a great job, but needs .Net v2 and the Tesseract language pack for the language used.
You can also save the page as a PDF, and open that one in PdfXchange viewer, which in recent versions has a very efficient and nicely working ocr tool to export selected text.
Besides, using Firefox, i often use an addon that saves a copy of the page as it is ,apparently without scripts. From that, you can just copy whatever you want.
Find it at https://addons.mozilla.org/en-US/firefox/addon/mozilla-archive-format/?src=search
In Firefox shift+right click will always get the default menu. I learned this by accident when I was trying to make shift+right click do something and it just wouldn’t work. Not sure if Chrome has something similar.
I learned something. Interesting. Many application shortcuts are unknown by many users. Shift+Right_Click on Firefox (at least) always brings up the default menu. Good to know.
That’s really good to know. Great tip!
Change browser View/Page option-Style …. to “No Style”
Also, often it is only the on screen visual ‘highlighting’ that is disabled — you can still highlight/copy text as normal with mouse/keyboard… you just can’t see the color/shade change on the text you select.
What bothers me the most are the pages where it is not possible to use bookmarklets in the kind of “Printwhatyoulike” or “Printliminator” to create pdf-files to archive.
All these methods don’t help in this case.
Thanks for the tips anyway.
Basically a bookmarklet should always operate correctly if javascript is not disabled. But there are some pages which have been crafted in such a way that they cannot be scanned from another site, indeed. I don’t know how they manage but I’ve noticed it, very few times, when saving a page with printfriendly.com or a dedicated bookmarklet. Also, some pdf-makers don’t handle https pages.
Reader View obviates the use of Printliminator.
Thanks for the tip about “Ctrl-u.” It may come in handy sometime.
simply use faststone capture to copy, print or save anything you want to on any site / desktop anywhere …no hassle no problem no magic…easy easy
thanks..really appreciate it! good job!
Thanks a lot! Method 1 worked. :D
Thanks! Method 1 worked for me!
How to copy content of a website that won’t accept the disabling of Javascript?
Disable JavaScript in the browser. Or, save the page, and copy it then.
Ctrl + U :) Thanks!
You can use GT Text (softocr.com). Is a totally free program for windows. And just press ALT+C and with OCR you have the blocked text.
In search machine or anywhere click right on website and choose print and you will able to copy
Thanks Bro
Method 3 for Chrome did it for me.
Thank you for helping me to do my job better and more efficiently. God bless.
u can try reader view mode in firefox its easy
There are web pages that disable that feature.
Thank you very much!! Really helpful and saves me a lot of time.
Thanks Man !!!
I *really* hate it when sites do this to me. Any web publisher who is attempting to plagiarize will already know how to bypass this, and anyone who doesn’t can search for a solution in 30 seconds. All it serves to do is make me feel like an idiot when all I’m really trying to do is select a few words to use as a search term so I don’t have to manually type it. I ended up using RightToClick as an alternative to jumping into the inspector every time.
This is priceless! Thank you all
Hi Martin,
Nice article and it is very useful!
I used to use the righttocopy extension but the person took it off. What else can I use for an extension on firefox to copy and paste sites that have disabled it?
in firefox one can use “reader mode” like described here http://useitsmart.com/copy-text-site-blocks-coping
This method worked for me on chrome:
Try to print page, then you can select the text in the preview window.
Thanks for this tips.. only way for me to copy some info on a page :D
Thanks alot. Finally this worked for me to copy some text on page . You saved my day
Thanks a ton!
thanks brotha!
Thank you Martin. It totally helped me for my project work.
Thanks a lot…
Make a bookmark and use this as URL:
javascript:void(document.oncontextmenu=null); document.body.onselectstart = function() {return true;};
Tested with Chrome.
Wastage of time.. literally of no use.
it works , thanks
Sometimes, if you can highlight the text then you have the option to search Google for the text you’ve highlighted and then click back into the searchbar and your search history should pop up with the last searched item being the text you’ve highlighted on the previous website.
RightToClick Chrome extension worked perfectly for me..
The turning off javascript didn’t work for me…
Hello, I have a browser made by Javascript disabling copying from it, how can I copy it. It’s not among the browsers you listed above. Can you help please
thx helped me a lot
One word, LEGEND!