A query string is the part of a URL that contains data to be passed to web applications such as CGI programs.

learn more… | top users | synonyms (1)

1491
votes
47answers
523k views

How can I get query string values?

Is there a plugin-less way of retrieving query string values via jQuery (or without)? If so, how, and if not what plugin do you recommend?
337
votes
4answers
89k views

Best practice: escape, or encodeURI / encodeURIComponent

When encoding a query string to be sent to a web server - what is the best practice to use from javascript: Use escape: escape("% +&="); OR use encodeURI() / encodeURIComponent() ...
133
votes
20answers
67k views

How to build a query string for a URL in C#?

A common task when calling web resources from a code is building a query string to including all the necessary parameters. While by all means no rocket science, there are some nifty details you need ...
91
votes
7answers
39k views

How to parse a query string into a NameValueCollection in .NET

I would like to parse a string such as "p1=6&p2=7&p3=8" into a NameValueCollection. What is the most elegant way of doing this when you don't have access to the Page.Request object?
77
votes
12answers
51k views

Parse query string in JavaScript [duplicate]

Possible Duplicate: How can I get query string values? I need to parse the query string www.mysite.com/default.aspx?dest=aboutus.aspx. How do I get the dest variable in JavaScript?
68
votes
8answers
14k views

Is an HTTPS query string secure?

I am creating a secure web based API that uses HTTPS; however, if I allow the users to configure it (include sending password) using a query string will this also be secure or should I force it to be ...
62
votes
8answers
49k views

how to get GET (query string) variables in node.js?

Can we get the variables in query string in node.js just like we get in $_GET in PHP? I know that in node.js we can get the url in request. Is there any method to get query string parameters?
61
votes
7answers
73k views

JavaScript query string

Is there any JavaScript library that makes a dictionary out of the query string, ASP.NET style? Something that would be used like: var query = window.location.querystring["query"]? Is a "query ...
51
votes
12answers
87k views

Adding a parameter to the URL with JavaScript

In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example: Original URL: http://server/myapp.php?id=10 Resulting URL: ...
37
votes
8answers
20k views

querystring encoding of a javascript object

Do you know a fast and simple way to encode a javascript object into a string that I can pass via GET? No jQuery, no other frameworks, just plain Javascript :)
34
votes
6answers
11k views

Best Practices for Passing Data Between Pages

The Problem In the stack that we re-use between projects, we are putting a little bit too much data in the session for passing data between pages. This was good in theory because it prevents ...
30
votes
6answers
33k views

Fastest way to implode an associative array with keys

I'm looking for a fast way to turn an associative array in to a string. Typical structure would be like a URL query string but with customizable separators so I can use '&' for xhtml links or ...
28
votes
3answers
35k views

Add querystring parameters to link_to

I'm having difficultly adding querystring parameters to link_to UrlHelper. I have an Index view, for example, that has UI elements for sorting, filtering, and pagination (via will_paginate). The ...
27
votes
3answers
16k views

ASP.NET MVC: url routing vs querystring

I have a page routed like /Comments/Search/3 where i search and display all the comments of the thread "3". I'm adding a sort function (by date, author etc). What is the best way to handle it? ...
25
votes
8answers
20k views

add or update query string parameter

With javascript how can I add a query string parameter to the url if not present or if it present, update the current value? I am using jquery for my client side development.

1 2 3 4 5 115
15 30 50 per page