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. To resolve this you do a hard refresh(ctrl+f5) but this only resolvesSuppose 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. To resolve this you do a hard refresh(ctrl+f5) but this only resolves […]

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…