JS | Web Dev | Web Frontend

JS Get Query String In URL

Handy way to get query string value in URL Example URL: https://www.example.com/index?query1=result1&query2=result2 const params = new URLSearchParams(window.location.search); // window.location.search is showing ?query1=result1&query2=result2 // then we can use the params.get(‘{paramName}’) for getting the query param console.log(params.get(‘query1’)) // result: result1 console.log(params.get(‘query2’)) // result: result2 For note: The query string value must be without hash (#). Try it […]

Continue Reading...

NGINX | Web Dev

ERR_CONTENT_LENGTH_MISMATCH

OS: MacOS SierraWeb Server: NGINX My local web dev environment using NGINX proxy to Webpack dev server. I use domain name to open the dev web instead of localhost. But today, the web page won’t open and showing ERR_CONTENT_LENGTH_MISMATCH in browser console when requesting some files. I thought the issue caused by browser plugins, but […]

Continue Reading...