1)What is CDN and how jQuery is related to it?
Ans)
CDN - It stands for Content Distribution Network or Content Delivery Network.
Generally, a group of systems at various places connected to transfer data files between them to increase its bandwidth while accessing data. The typical architecture is designed in such a way that a client access a file copy from its nearest client rather than accessing it from a centralized server.
So we can load this jQuery file from that CDN so that the efficiency of all the clients working under that network will be increased.
Example :
We can load jQuery from Google libraries API
-------------------------------------------------
2)What is the advantage of using the minified version of JQuery rather than using the conventional one?
Ans)
The advantage of using a minified version of JQuery file is Efficiency of the web page increases.
The normal version jQuery-x.x.x.js has a file size of 178KB
but the minified version jQuery.x.x.x-min.js has 76.7 KB.
The reduction in size makes the page to load more faster than you use a conventional jQuery file with 178KB
-------------------------------------------------
3) Do we need to add the JQuery file both at the Master page and Content page as well?
Ans)
No, if the Jquery file has been added to the master page then we can access the content page directly without adding any reference to it.
This can be done using this simple example
------------------------------------------------
4)What is the use of Using Statement ?
Ans)
Using statement is used similar to finally block that is to dispose the object.
It declares that you are using a disposable object for a short period of time.
Once the using block ends,the CLR releases the corresponding object immediately by calling its dispose() method.
Example:
//Write code to allocate some resource
//List the allocated resource in a comma-separated list inside
//the parenthesis of the using block
using(...)
{
//use the allocated resource
}
//Here dispose() method is called for all the object referenced without writing any additional code.
-------------------------------------------------
0 comments: