CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sat, 23 Aug 2025 00:38:27 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20081010152159
location: https://web.archive.org/web/20081010152159/https://www.adamv.com/dev/javascript/querystring
server-timing: captures_list;dur=0.571821, exclusion.robots;dur=0.022724, exclusion.robots.policy;dur=0.009984, esindex;dur=0.013450, cdx.remote;dur=11.830386, LoadShardBlock;dur=267.315833, PetaboxLoader3.datanode;dur=95.351009, PetaboxLoader3.resolve;dur=64.604279
x-app-server: wwwb-app203
x-ts: 302
x-tr: 302
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app203; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sat, 23 Aug 2025 00:38:28 GMT
content-type: text/html; charset=UTF-8
x-archive-orig-date: Fri, 10 Oct 2008 22:21:59 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Thu, 29 May 2008 02:32:31 GMT
x-archive-orig-etag: "16ad093-120c-5751adc0"
x-archive-orig-accept-ranges: bytes
x-archive-orig-vary: Accept-Encoding
x-archive-orig-x-powered-by: The blood, sweat and tears of the fine, fine TextDrive staff
x-archive-orig-served-by: TextDrive
x-archive-orig-content-length: 2060
x-archive-orig-connection: close
x-archive-orig-x_commoncrawl_parsesegmentid: 4360
x-archive-orig-x_commoncrawl_originalurl: https://www.adamv.com/dev/javascript/querystring
x-archive-orig-x_commoncrawl_urlfp: -7463848373949435158
x-archive-orig-x_commoncrawl_hostfp: -7215380766420253176
x-archive-orig-x_commoncrawl_signature: 43527e7399dccde03b6f6b1acacd3bca
x-archive-orig-x_commoncrawl_crawlno: 1
x-archive-orig-x_commoncrawl_fetchtimestamp: 1223677319541
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
x-archive-orig-content-encoding: gzip
memento-datetime: Fri, 10 Oct 2008 15:21:59 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 06 Apr 2006 06:40:18 GMT", ; rel="prev memento"; datetime="Sat, 17 May 2008 10:05:38 GMT", ; rel="memento"; datetime="Fri, 10 Oct 2008 15:21:59 GMT", ; rel="next memento"; datetime="Sun, 02 Aug 2009 22:19:41 GMT", ; rel="last memento"; datetime="Wed, 22 Jan 2025 02:30:01 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 1224041539726_16-c/1224041711745_18.arc.gz
server-timing: captures_list;dur=1.275301, exclusion.robots;dur=0.021996, exclusion.robots.policy;dur=0.010934, esindex;dur=0.010254, cdx.remote;dur=7.821456, LoadShardBlock;dur=112.146350, PetaboxLoader3.datanode;dur=97.979305, PetaboxLoader3.resolve;dur=102.843717, load_resource;dur=180.689786
x-app-server: wwwb-app203
x-ts: 200
x-tr: 330
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
JavaScript: Parsing the Querystring
Projects » JavaScript » Querystring
Parsing a Querystring in JavaScript
28 May 2008
The Querystring
class parses "name=value" pairs from a querystring with client-side JavaScript.
In web browsers you can access the querystring with client-side JavaScript, but there is no standard way to parse out the name/value pairs.
This code provides a "Querystring" object that can parse the current document's querystring, or any querystring passed to the constructor. When passing a string, do not include an initial "?".
This object may be useful for "Ajax" coding, either for getting values for the current page or parsing results sent back in querystring form.
API Reference
- new Querystring([querystring])
-
Creates a new Querystring object, optionally passing a string
qs
to parse. Ifqs
is omitted, the querystring from the current page is used. - If
querystring
is passed, it should not begin with a"?"
.// Parse the current page's querystring var qs = new Query