Hello, I need to know how query parameters are used to load different versions of a webpage on local server? When I googled “query parameters,” I got a lot of answers about how to use them on the server side. But what am I supposed to do if I only want to change local server (and using vanilla JS) from:
With this you mean a local server instance, like a dev server you use on your machine?
(some example includes webpack dev server, parcel, your own apache…)
Or you mean the browser?
According to this the answer may change.
Sorry, not sure (my knowledge of the mechanics of how webpages work is so weak). But basically, I have a folder with index.html. That HTML file reads in the JS file. Then I run ‘python -m http.server’ which creates my page at localhost:8000. And I view that page in chrome browser.
Unfortunately, I need to use query parameters to switch between versions of webpage. So if query parameter returns “configA” and “data_1”, then version A of the page should show and if query parameter returns “configB” and “data_2”, then version B of the page should show.