If there is no indication about this time consuming process then user will be getting confused. They won't know whether any process is going on or some problem occurred.
In this case, we should show some indication to the user so that they can wait till completing the process.
In this article,I will explain about how to do this indication effectively.
1. Put an animated gif (e.g loading.gif as shown below ) to indicate loading of page in your web folder.
2.Within the body tag of html file place this code
<div id="PopUpBackGround" >
<img src="loading.gif" alt="Loading...." />
3. Then define the style for the above div tag in your CSS style sheet file as below.
It will be used for graying out the webpage till the page loading is completed. By setting very high z-inex the user will be prevented from changing anything in the screen till the page loading gets completed.