473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to remove session ids from url parameters using JS?

10
In our application, the URL is getting appended with some dynamic sessions. I am reading the URL paramteres using

var sNewUrl=document.location.pathname;

The above statement is also capturing the SESSIONID which is not required.

URL is-
http://yoursite.com/view/index.htmlSESSIONID=YyRMNv7D7BCh1G175lC5xnZlYfGGDT wjTzhJD52LpR1nxlvjNwLc!415886835!NONE

Can you please suggest me how to filter out the SESSION ID parameters after index.html using JS?

Appreciate relevant responses!
Mar 3 '11 #1
2 2366
Dormilich
8,658 Expert Mod 8TB
maybe var sNewUrl = document.location.pathname.split("?")[0]; works.
Mar 3 '11 #2
dgreenhouse
250 Expert 100+
If you have control of the php.ini file, you can configure php to not send session information in the url. Note that this will disallow sessions if the user has cookies turned off.
Mar 3 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Todd | last post by:
I'm having trouble porting something from VB 6.0 with MSXML 4.0 to C# and the .Net framework. Using MSXML 4.0, I use the HTTPRequest object to get the following page and obtain a list of...
0
by: Aaron | last post by:
The following code works fine when previewing a Crystal report using ASP, EXCEPT when it gets to a report using a SubReport and its associated parameters. The whole report just comes up blank with...
5
by: Abhilash.k.m | last post by:
This is regarding the session management using Out of proc session management(SQL SERVER). Among the samples below which one is better to set the session? 1. There are 20 session...
3
by: ABC | last post by:
How to automatic redirect if session timeout using ASP.NET 1.1?
2
by: satisharas | last post by:
Hello, I am trying to write a custom session manager in ASP.NET 2.0 using oracle as the backend. I want to know how the session expires in web garden and we are using NLB (a session can be...
3
by: msnews.microsoft.com | last post by:
I have a constructor with parameters. __gc public class GpsUsbDevice : public GpsDevice { public: GpsUsbDevice(String* DeviceName) { }
9
by: viz | last post by:
hi, i have written a class for session handling, and i want to use it to keep track of the user. After authenticating the user in login page i am storing the session info like uname etc.. in a...
1
by: menmysql | last post by:
hi to all i want to send multiple parameters using javascript. i am trying as follows <a href="./Admin.jsp?per=null?per1=null">
0
by: gomzi | last post by:
Hi, I am currently forced to use no-cache in my pages so that the session gets cleared properly. In-case I remove the no-cache piece of code from my pages, the user will be able to visit the...
2
by: spy27kid | last post by:
Hi, I'm Alex Mark. I have face a problem in using C#. Hope anyone can help me. I want use C# to delete the session record. The session will look like the grid view. So when I click the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.