Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hiding URL Parameters

Posted on 2013-05-26
6
Medium Priority
?
2,456 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 59

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 1000 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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 59

Accepted Solution

by:
Julian Hansen earned 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

688 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