Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7820737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:24:45+00:00 2026-06-02T07:24:45+00:00

referrer` and saving the value in a cookie. The result is coming like this

  • 0

referrer` and saving the value in a cookie. The result is coming like this with strange characters:

http%3A//www.rzammit.com/props/testpage.asp%3Fadv%3D123%26loc%3D45

How I can remove those strange characters so the link will show correctly please?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:24:47+00:00Added an answer on June 2, 2026 at 7:24 am
    1. use a cookie script that unescapes the cookie before returning it OR
    2. look here how to urldecode: Javascript equivalent to php's urldecode()
    var url = "http%3A//www.rzammit.com/props/testpage.asp%3Fadv%3D123%26loc%3D45";
    url = decodeURIComponent(url.replace(/\+/g, ' '));
    

    Here is the cookiescript I have used since mid ’90s – fee free to replace escape with encodeURIComponent and unescape with decodeURIComponent to bring it into the 2010s 😉

    // cookie.js file
    var cookieToday = new Date(); 
    var expiryDate = new Date(cookieToday.getTime() + (365 * 86400000)); // a year
    
    /* Cookie functions originally by Bill Dortsch */
    
    function setCookie (name,value,expires,path,theDomain,secure) { 
       value = escape(value);
       var theCookie = name + "=" + value + 
       ((expires)    ? "; expires=" + expires.toGMTString() : "") + 
       ((path)       ? "; path="    + path   : "") + 
       ((theDomain)  ? "; domain="  + theDomain : "") + 
       ((secure)     ? "; secure"            : ""); 
       document.cookie = theCookie;
    } 
    
    function getCookie(Name) { 
       var search = Name + "=" 
       if (document.cookie.length > 0) { // if there are any cookies 
          var offset = document.cookie.indexOf(search) 
          if (offset != -1) { // if cookie exists 
             offset += search.length 
             // set index of beginning of value 
             var end = document.cookie.indexOf(";", offset) 
             // set index of end of cookie value 
             if (end == -1) end = document.cookie.length 
             return unescape(document.cookie.substring(offset, end)) 
          } 
       } 
    } 
    function delCookie(name,path,domain) {
       if (getCookie(name)) document.cookie = name + "=" +
          ((path)   ? ";path="   + path   : "") +
          ((domain) ? ";domain=" + domain : "") +
          ";expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I get referrer url, IIS 7 throws an exception. My code like this:
I'd like to capture the http referrer url following the rendering of a custom
I have the following: if (referrer.indexOf(Ral) == -1) { ... } What I like
I would like to know if there is a better solution for this. The
Upon refreshing http://mydomain.com , it will generate a random ID to display on the
I'd like to track the referrer URL for the first point of contact a
I would like to make the referrer visible in error tickets, so I can
What will be the best way to go about getting the referrer details like
I received strange broken link report: Subject: Broken link on googleads.g.doubleclick.net Referrer: (url on
I've found the referrer attribute on nsIHttpChannel and this works most of the time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.