• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

disable Save As

 
Ranch Hand
Posts: 285
2
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Can any one tell me how to disable "save as" and "print" option of browser menu bar?
if I go through File->Save As or Print, the document gets printed and saved.


I want to prevent this as this is for a requirement.


Can any one help me out in this issue?


Thanks in advance
 
Saloon Keeper
Posts: 15484
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't.
 
Mohammed Sardar.
Ranch Hand
Posts: 285
2
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:You can't.



Thanks and I read this at many places but had a hope that technology changes everyday. so that to get clarified.

Is it because Any browser is a software of Windows ? so that we don't have access to browser functionality. If you know beyond this please share.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:You can't.


And if you could, you shouldn't. It's not your browser; it's the end user's. You shouldn't be trying to screw with it.
 
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There wouldn't be a point to it anyway, as the user could still take screenshots.

Let's take a step back: Why would you want to do this?
 
Mohammed Sardar.
Ranch Hand
Posts: 285
2
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:There wouldn't be a point to it anyway, as the user could still take screenshots.

Let's take a step back: Why would you want to do this?



Agree. Some confidential, but in crisp, a banking app requires this disable for "Save As".
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you need to prevent users from saving in a banking app? That seems like attempting security by obscurity. Which doesn't work. The data is on the user's machine which means the user has the code.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And then your next requirement will be to disable the "View Page Source" option, and then to disable the browser's web development tools. All of which allow the user to see (and copy) the page's HTML. This is a futile path to go down.
 
Tim Moores
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And, I'd like to stress again that it'd achieve no security improvement. There should be nothing in the page that imperils security if seen by the user. If this kind of thing is considered as enhancing security, then something has been designed profoundly wrong (or security concepts have been misunderstood).
 
Mohammed Sardar.
Ranch Hand
Posts: 285
2
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
++. This app will not be used by customers of bank.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't imagine any use case where disabling save as is useful.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Who is the user then, and what is the intent of the requirement?

As others have pointed out, it serves no practical use.
 
Stephan van Hulst
Saloon Keeper
Posts: 15484
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's pretty simple really: The user doesn't get anything to say about how your server works (imagine if they could!), and you don't get anything to say about how the user's browser works. If the user isn't allowed to do something with some data, then you shouldn't send that data to the user.
 
Mohammed Sardar.
Ranch Hand
Posts: 285
2
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your great time and effort. Let me get back on this with some more please.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic