How to prevent browser to cache JavaScript and CSS file

Suppose your JavaScript and CSS files refer to your master page and you modify the piece of JavaScript code or CSS Style in these files the change are not reflected after that you debug the code and found your code changes are missing. In this tutorial, I show how to prevent browser to cache JavaScriptSuppose your JavaScript and CSS files refer to your master page and you modify the piece of JavaScript code or CSS Style in these files the change are not reflected after that you debug the code and found your code changes are missing. In this tutorial, I show how to prevent browser to cache JavaScript […]

Read More…

String.format in JavaScript

In this tutorial, I show you how to format string in JavaScript. There is no direct equivalent method like string.format in JavaScript similar to C# but the same can be achieved by creating the string prototype method. Suppose we have one string where {0} and {1} placeholders need to be replaced with some string literalsIn this tutorial, I show you how to format string in JavaScript. There is no direct equivalent method like string.format in JavaScript similar to C# but the same can be achieved by creating the string prototype method. Suppose we have one string where {0} and {1} placeholders need to be replaced with some string literals […]

Read More…

Capitalize first letter using JavaScript

In this tutorial, I show you how you can capitalize the first letter of the string. JavaScript provided several methods for string manipulation and there are different ways that can be used to capitalize the first letter of the string using JavaScript. Capitalize the first letter using javascript required a little bit of code butIn this tutorial, I show you how you can capitalize the first letter of the string. JavaScript provided several methods for string manipulation and there are different ways that can be used to capitalize the first letter of the string using JavaScript. Capitalize the first letter using javascript required a little bit of code but […]

Read More…

Compare location.href vs location.replace vs location.assign and window.open

During client-side development, you come across the situation where you have to redirect from one webpage to another webpage. Javascript provides several ways to redirect to a page and below properties/method are used to redirectDuring client-side development, you come across the situation where you have to redirect from one webpage to another webpage. Javascript provides several ways to redirect to a page and below properties/method are used to redirect […]

Read More…