display preview of an image without uploading to the server using javascript

All of us might be tried to load preview of an image which is to be uploaded to the server. Previously we can’t do this without uploading that particular file to the server. Now the latest versions of most of the browsers supports FILEREADER Web API. Using this we can display the preview of an image file without uploading to the server, using Javascript. The Javascript code given below:


Read More

Change browser URL without reloading a web page

Here, we can see the way to change the browser URL without reloading a web page using Javascript. It is a HTML5 property. It is very easy to change the browser URL while using Ajax if we want. See the example given below:

Also please note that this method never causes a hashchange event to be fired, even if the new URL differs from the old URL only in its hash. For more details see

Read More

Rendering MathML properly in Windows

Here, I’m going to explain about the MathML rendering in Safari browser on Windows OS. When I was worked with MathML, I faced some issues while rendering in Windows (OS: XP, Windows 7) and I found the solution for it. The solution is we have to use either STIX fonts or Asana fonts in Windows.

I have downloaded those fonts and pasted in font folder inside control panel. After done this, I again take the corresponding page which contains MathML data and verified that the data is rendering well.

To download STIX fonts click here

To download Asana fonts click here

Read More

Image caching using javascript

Here I’m going to say a simple way to cache images while loading web page using JavaScript. Well we know where the images are located in our server. So first we need to specify the path of images into an JavaScript array, which you want to cache while loading a web page as shown below:


Copy and paste the above code inside the head tag of your web page and call the function preCacheImages()  in onLoad event of body tag.

<body onload=”javascript: preCacheImages(arrImages);” >


Read More