Posts

Showing posts with the label Performance

Remove Whitespace From aspx pages - Performance with page speed

Some web page have a thousand line of html code and it will increase the size of the page to download to users. It is often possible to make a content of web page fewer bytes(their size) without changing the appearance or function of the page. This approach will improve download time and makes the page load faster. The question how to make this happen without extra effort to remove the space manually and without effect the development time. This is a snippet code that you need to put in your Master page so that the code will automatically override the Render Event in asp.net The Code to put in Master Page The Attribute/Field for masterpage private static readonly Regex REGEX_BETWEEN_TAGS = new Regex(@">\s+<", RegexOptions.Compiled); private static readonly Regex REGEX_LINE_BREAKS = new Regex(@"\n\s+", RegexOptions.Compiled); The Override Method /// <summary>         /// Initializes the <see cref="T:System.Web.UI.HtmlTextWriter">&l

Understanding The Web Page Processing(End To End)

Image
A common way to think about the Web is that there is a browser on one end of a network connection and a web server with a database on the other end.  Simplified web architecture model The simplified model is easy to explain and understand, and it works fine up to a point. However, quite a few other components are actually involved, and many of them can have an impact on performance and scalability.The next picture shows some of them for web sites based on ASP.NET and SQL Server. Web architecture components that can impact performance All of the components in picture above can introduce delay into the time it takes to load a page, but that delay is manageable to some degree. Additional infrastructure-oriented components such as routers, load balancers, and firewalls aren’t included because the delay they introduce is generally not very manageable from a software architecture perspective. In the following list, I’ve summarized the process of loading a web page. Each of these steps offers

Javascript - Inline Code VS External Files

Inline Code <html> <head> <script type="text/javascript"> function a() { alert('hello world'); } </script> </head> <body> : : </body> </html> External Files <html> <head> <script type="text/javascript" src="/scriptone.js"> </script> </head> <body> : : </body> </html> scriptone.js function a() { alert('hello world'); } As you can see from the above example,  what is the advantage to put all script in one file and just call it from html( External Code ) instead of just write it in html( inline code ).? The answer is here :  By using external code, the javascript code is much more maintainability :- javascript Code that is sprinkled throughout various HTML pages turns code maintenance into a problem. It is much easier to have a directory for all javascript files so that developers can edit JavaScript code independent of the markup in which it is u