Solved

Hiding URL Parameters

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

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
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.

 
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 52

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript waiting 14 66
how can display objects ? 3 18
Sums of coloumns in html/java 15 64
Replace &lt; with < 14 53
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
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…

932 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

11 Experts available now in Live!

Get 1:1 Help Now