Jump to content
  • 0

How do I clear query string in client side browser


perdman

Question

I am using javascript to generate links within HTML blocks in my Caspio account. These links include name/value pairs, which are variables, determined by data within specific database records.

I am having no problem generating the links, in the format that I need. My problem arises when one of the links is clicked by a client, where a specific name/value pair is not blank. Then, later the client clicks on another link where the value is blank. The client's browser has cached the previous value and continues to apply that value.

I need a way to clear the previous query string, so the clients browser will properly read the value as blank.

Here is an example:

http://www.mysite.com/mypage.htm?field1=value1&field2=value2'>link

This works great the first time through. However, when I want the URL to look like this:

http://www.mysite.com/mypage.htm?field1=&field2=value2'>link *notice field1 value is blank!

The client's browser simply remembers the first query that was sent and defaults back to that.

Can I put a line of code in the page header or something in the query string that will kill the first query?

If anyone has any suggestions, I'd really appreciate it.

Thank You

Sam Williams

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...