This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Need help in writing a secure code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Need help in writing a secure code " Watch "Need help in writing a secure code " New topic
Author

Need help in writing a secure code

Bhavis Siddappa
Greenhorn

Joined: Jan 20, 2009
Posts: 1
1. Code to disable the back button in the browser.

2. Code to disable the back button in the keyboard

3. Code to make the URL read-only

4. Code for Encryption and decryption of the query string in the URL

5. Code to clear the history from the browser for a specific Site/ URL
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
1) Impossible - there are history.go() hacks, but they are not really disabling it
2) Impossible - there are history.go() hacks, but they are not really disabling it
3) Impossible - URLS can be changed, user can easily write it down and type it in manually
4) You can find hashing stuff out there on the net, BUT you got to realize that the code is is plain site to the user and anyone with a little knowledge of JS can get it.
5) You really can not do that. Look into using Posts with expires meta tags.

It is virtually impossible to make a page secure like you want to do. You need to build security on your serverside and make it smart to handle different situations.

Eric
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
I would hammer in: securing your application is to be done at the server side!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need help in writing a secure code