Solved

Hiding URL Parameters

Posted on 2013-05-26
6
1,684 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 54

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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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 54

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

776 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