Solved

Hiding URL Parameters

Posted on 2013-05-26
6
1,424 Views
Last Modified: 2013-05-30
Hello Experts,

How do I Hide URL Parameters without reloading page in Javascript. For example if URL after load is showing "http://something.com/userid=1001" then after page is loaded i want to show the url to user as "http://something.com/userid=***".
             There is no need of any other security to be implemented, only thing is required to change the text only.

Any help on this will be highly appreciated.

Thanks
0
Comment
Question by:Swadhin Ray
6 Comments
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39198607
0
 
LVL 11

Expert Comment

by:Kusala Wijayasena
ID: 39198715
When parameters are passing in HTTP GET, it is visible for the user in the URL. When passing variables in HTTP POST, it will not visible to the user in the URL
0
 
LVL 15

Assisted Solution

by:Jagadishwor Dulal
Jagadishwor Dulal earned 250 total points
ID: 39198828
As you want http://something.com/userid=*** it is better to secret your userid like I am showing here php example.
here userid=1111;
<?php
$url=http://something.com/userid=md5(1111);
?>

Open in new window


When you will check userid:

<?php
$userid=$_GET['userid'];
//Fetch record from db here I assume that userid contain in userid column and you fetch data in $row variable
//Now check 
$userid=md5($row['userid'];
?>

Open in new window

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 16

Author Comment

by:Swadhin Ray
ID: 39201010
Currently I cannot change the structure to "HTTP GET" or "HTTP  POST" and I am using JAVA , not PHP.

Please suggest if there is any way to do it on JAVA script (Client Side only).
0
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 250 total points
ID: 39201118
I think my first post points to a link that shows you how to do this.

In case you missed it here it is again

http://stackoverflow.com/questions/824349/modify-the-url-without-reloading-the-page
0
 
LVL 16

Author Closing Comment

by:Swadhin Ray
ID: 39208584
thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

705 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

17 Experts available now in Live!

Get 1:1 Help Now