Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi. How i can optimize loading site web pages?
i have a site master-page and some other pages.
is there a way, how i can load only page content after navigating by a-tag, but master-page content will not be loaded again?
Posted
Comments
ZurdoDev 30-Apr-15 9:29am    
Just google for optimization techniques. Or look at Yslow.

1 solution

You cannot control anything like that. You are not downloading a page, HTTP server and Web browser do it together. You can only control the content of the pages.

To understand it, you just need to get some understanding of Web operation. Take master/content pages. This is a purely server-side technique, one of the many. Whole purpose of ASP.NET is to compose HTTP responses on the fly, in response to Web browser's HTTP request. On the client side, there is always one single page. The HTTP request from a browser has some URI which is taken by the server, and ASP.NET assembles the page, which can be combined with master page, and a lot more (for example, current data fetched from database, pictures composed on the fly, anything).

At the same time, a set of additional files are loaded on separate HTTP requests. This happens when the HTML page contains other URIs, such as image files, style files, JavaScript files, and so on. In contrast to master/content pages, each separate URI causes separate exchange of HTTP requests/response, which could be less efficient on average, compared to having all resources embedded in a single HTTP page. But it could be a real problem only in pathological cases. Normally, nobody tries to seriously "optimize" it. CSS and JavaScript files can be embedded, but embedding of images does not look realistic.

Are you familiar with comment advice on general programming: "don't optimize prematurely", "don't do manual optimization", "firs of all, care of correct functionality"? None of then is the absolute, but perhaps you need to get general understanding of the Web first, before you care of "optimization".

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900