[{"data":1,"prerenderedAt":304},["ShallowReactive",2],{"term-q\u002Fquery-string":3,"related-q\u002Fquery-string":288},{"id":4,"title":5,"acronym":6,"body":7,"category":270,"description":271,"difficulty":272,"extension":273,"letter":274,"meta":275,"navigation":60,"path":276,"related":277,"seo":282,"sitemap":283,"stem":286,"subcategory":6,"__hash__":287},"terms\u002Fterms\u002Fq\u002Fquery-string.md","Query String",null,{"type":8,"value":9,"toc":264},"minimark",[10,15,19,23,26,30,253,257,260],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A query string is the part of a URL after the question mark. It's how you pass extra information to a web server — like search terms, page numbers, or filters. 'google.com\u002Fsearch?q=cats' — everything after '?' is the query string: q=cats.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A query string is the portion of a URL beginning with '?' containing key-value pairs separated by '&'. It passes parameters to the server without affecting the resource path. Query strings are visible in the URL, logged by servers, and can be bookmarked.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Parsing query strings\n\u002F\u002F URL: \u002Fproducts?category=shoes&size=10&color=red\n\n\u002F\u002F Express.js\napp.get('\u002Fproducts', (req, res) => {\n  const { category, size, color } = req.query;\n  \u002F\u002F category = 'shoes', size = '10', color = 'red'\n});\n\n\u002F\u002F Vanilla JS\nconst params = new URLSearchParams(window.location.search);\nconst category = params.get('category'); \u002F\u002F 'shoes'\n","javascript","",[38,39,40,49,55,62,68,120,159,165,175,180,186,219],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F Parsing query strings\n",[41,50,52],{"class":43,"line":51},2,[41,53,54],{"class":47},"\u002F\u002F URL: \u002Fproducts?category=shoes&size=10&color=red\n",[41,56,58],{"class":43,"line":57},3,[41,59,61],{"emptyLinePlaceholder":60},true,"\n",[41,63,65],{"class":43,"line":64},4,[41,66,67],{"class":47},"\u002F\u002F Express.js\n",[41,69,71,75,79,83,86,89,93,95,98,101,105,107,110,113,117],{"class":43,"line":70},5,[41,72,74],{"class":73},"sTEyZ","app",[41,76,78],{"class":77},"sMK4o",".",[41,80,82],{"class":81},"s2Zo4","get",[41,84,85],{"class":73},"(",[41,87,88],{"class":77},"'",[41,90,92],{"class":91},"sfazB","\u002Fproducts",[41,94,88],{"class":77},[41,96,97],{"class":77},",",[41,99,100],{"class":77}," (",[41,102,104],{"class":103},"sHdIc","req",[41,106,97],{"class":77},[41,108,109],{"class":103}," res",[41,111,112],{"class":77},")",[41,114,116],{"class":115},"spNyl"," =>",[41,118,119],{"class":77}," {\n",[41,121,123,126,129,132,134,137,139,142,145,148,151,153,156],{"class":43,"line":122},6,[41,124,125],{"class":115},"  const",[41,127,128],{"class":77}," {",[41,130,131],{"class":73}," category",[41,133,97],{"class":77},[41,135,136],{"class":73}," size",[41,138,97],{"class":77},[41,140,141],{"class":73}," color",[41,143,144],{"class":77}," }",[41,146,147],{"class":77}," =",[41,149,150],{"class":73}," req",[41,152,78],{"class":77},[41,154,155],{"class":73},"query",[41,157,158],{"class":77},";\n",[41,160,162],{"class":43,"line":161},7,[41,163,164],{"class":47},"  \u002F\u002F category = 'shoes', size = '10', color = 'red'\n",[41,166,168,171,173],{"class":43,"line":167},8,[41,169,170],{"class":77},"}",[41,172,112],{"class":73},[41,174,158],{"class":77},[41,176,178],{"class":43,"line":177},9,[41,179,61],{"emptyLinePlaceholder":60},[41,181,183],{"class":43,"line":182},10,[41,184,185],{"class":47},"\u002F\u002F Vanilla JS\n",[41,187,189,192,195,198,201,204,207,209,212,214,217],{"class":43,"line":188},11,[41,190,191],{"class":115},"const",[41,193,194],{"class":73}," params ",[41,196,197],{"class":77},"=",[41,199,200],{"class":77}," new",[41,202,203],{"class":81}," URLSearchParams",[41,205,206],{"class":73},"(window",[41,208,78],{"class":77},[41,210,211],{"class":73},"location",[41,213,78],{"class":77},[41,215,216],{"class":73},"search)",[41,218,158],{"class":77},[41,220,222,224,227,229,232,234,236,238,240,243,245,247,250],{"class":43,"line":221},12,[41,223,191],{"class":115},[41,225,226],{"class":73}," category ",[41,228,197],{"class":77},[41,230,231],{"class":73}," params",[41,233,78],{"class":77},[41,235,82],{"class":81},[41,237,85],{"class":73},[41,239,88],{"class":77},[41,241,242],{"class":91},"category",[41,244,88],{"class":77},[41,246,112],{"class":73},[41,248,249],{"class":77},";",[41,251,252],{"class":47}," \u002F\u002F 'shoes'\n",[11,254,256],{"id":255},"when-youll-hear-this","When You'll Hear This",[16,258,259],{},"\"Pass the search term as a query string parameter.\" \u002F \"Don't put sensitive data in the query string — it appears in logs.\"",[261,262,263],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":265},[266,267,268,269],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":255,"depth":51,"text":256},"networking","A query string is the part of a URL after the question mark.","beginner","md","q",{},"\u002Fterms\u002Fq\u002Fquery-string",[278,279,280,281],"URL","Path Parameter","Request","URI",{"title":5,"description":271},{"changefreq":284,"priority":285},"weekly",0.7,"terms\u002Fq\u002Fquery-string","m5PPdpLXfCZgWazaauk7lvXCyQq7IcP5SQV6lCZ2Ud0",[289,292,295,300],{"title":279,"path":290,"acronym":6,"category":270,"difficulty":272,"description":291},"\u002Fterms\u002Fp\u002Fpath-parameter","A path parameter is a variable embedded directly in the URL path. Instead of '?id=5', you put the value right in the path: '\u002Fusers\u002F5'.",{"title":280,"path":293,"acronym":6,"category":270,"difficulty":272,"description":294},"\u002Fterms\u002Fr\u002Frequest","A request is what your browser (or app) sends to a server when it wants something. 'Give me the homepage.' 'Give me that image.",{"title":281,"path":296,"acronym":297,"category":270,"difficulty":298,"description":299},"\u002Fterms\u002Fu\u002Furi","Uniform Resource Identifier","intermediate","A URI is the general term for any identifier of a resource. URLs are URIs that tell you WHERE and HOW to get something.",{"title":278,"path":301,"acronym":302,"category":270,"difficulty":272,"description":303},"\u002Fterms\u002Fu\u002Furl","Uniform Resource Locator","A URL is the complete web address of something on the internet — the full 'how to get there' including the protocol, domain, path, and any query parameters...",1776518305128]