Javascript URL encryption

Posted on 2005-03-11
Medium Priority
Last Modified: 2008-02-01
I am using the following javascript notation:-

window.location ="http://blahblahblah.com/test.aspx?id=123&user=me"

I want to know if there is a secure javascript method of encryting the url string so that the id and user values cannot be seen ?
Question by:naveenraj
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
LVL 32

Expert Comment

ID: 13522060
There are no safe methods in Javascript for this.

What do you need this for? Maybe there are alternative solutions.

LVL 18

Expert Comment

ID: 13522257
What is the purpose of hiding the URL, does it contain sensitive data like passwords or credit card info? If so you might want to try using a JavaScript to get a MD5, SHA1 or stronger hash from the input to pass along to query where you can then verify the hash to a stored hash. Otherwise as Batalf stated, there really is no reliable 'encryption' for JavaScript since its so easily defeated.

LVL 63

Expert Comment

ID: 13523888
Submit the data as POSTed form fields to that url, so are no values visible in the url.
LVL 16

Accepted Solution

ellandrd earned 750 total points
ID: 13530318
if you wnat tp hide the url, use iframes inside your pages.

this will hide your url
LVL 16

Expert Comment

ID: 13530320
*want to*

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

741 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