how do i disable "save" and "save as" options of web-browser while it is viewing my html page?

Posted on 2007-08-11
Last Modified: 2013-11-05
I'm working with one of my client and his requirement is to disable the copying of the content which his client is viewing. I'd done the basic stuffs of disallowing copy/cut-paste and printing. But, the viewer can easily download the content using "save-As" options present in the "Web-Browser". So, i need to disable it programmatically as soon as my html page is activated.
Question by:spadeworx
    LVL 14

    Accepted Solution


    I don't believe you can unfortunately
    LVL 14

    Expert Comment


    Frankly anyone with a basic knowledge of computers can easily grab the contents of the website even if you have blocked the copy/paste, right click disabled....I would suggest you can protect your images by doing as below...

    Now listen to me, do this:

    1st Create a *.Js file with the scripts:

    var myVar='<img src="myimg.jpg" galleryimg="no">'

    2nd In your html put your script:

    <script src="myscript.js"></script>

    with this:
    Your image will now show the icon "save as" and, when you save the page, the browser (IE) save the all the page without your img.!

    Copying the text can be done anyways....
    LVL 14

    Expert Comment


    But again there is a loop hole to it....Moreover, my suggestion will mean that users that have client-side scripting disabled won't get an image at all.

    I shall ask you who cares when the user can just right click and select "Save as..."? Or take a screen shot. Or look in the script file and obtain the URL.

    The average user really doesn't care about saving your content. Even if they did, it would be for personal use only which is not something to be concerned about. People that actually go looking for content to steal (whether to sell or use in their own site) will not be bothered by anything you try.

    You secure nothing, but do manage to obstruct visitors from using their browser properly. That is hardly something to be proud about.
    LVL 17

    Expert Comment

    I am going to agree with the experts here.  Disabling anything inside the browser is impossible.  Allowing a webpage to manipulate the browser would be a major security hole and the concept of a webpage controlling the browser just doesn't make sense.

    Secondly, the webpage, your html and images, is completely downloaded to the client's computer when they first view it.  If they need to find the image they need only look in their cache or temporary internet files... the data is somewhere on their computer the moment they are viewing the page.

    That means if you want to disrupt the user's normal interaction between a browser and a webpage you are just going to frustrate them.

    Unless there is a good reason or specific situation surrounding the content that you don't want downloaded you can only mask or obscure the information because by the time the user sees the webpage, they already have the data on their computer.  Always available to be saved forever with the "Save" and "Save as" options.

    - Joe P
    LVL 51

    Expert Comment

    simple question, simple answer: you cannot. Dot.
    Wait, there is one solution: don't deliver the page.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now