• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

disable Save As  RSS feed

 
Ranch Hand
Posts: 202
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • 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: 9400
181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't.
 
Mohammed Sardar.
Ranch Hand
Posts: 202
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • 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.
 
Author and ninkuma
Marshal
Posts: 66826
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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: 4871
117
  • Mark post as helpful
  • send pies
  • 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: 202
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • 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
Marshal
Posts: 38684
677
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
 
Sheriff
Posts: 23714
50
Eclipse IDE Firefox Browser MySQL Database
  • Likes 3
  • Mark post as helpful
  • send pies
  • 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: 4871
117
  • Mark post as helpful
  • send pies
  • 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: 202
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
++. This app will not be used by customers of bank.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 38684
677
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't imagine any use case where disabling save as is useful.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66826
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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: 9400
181
  • Mark post as helpful
  • send pies
  • 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: 202
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your great time and effort. Let me get back on this with some more please.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!