Home > Microsoft .Net Development Tips > .NET Developer > Best practices of the AJAX kind
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

.NET DEVELOPER

Best practices of the AJAX kind


George Lawton
06.25.2008
Rating: --- (out of 5)


ASP.NET Channel
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


AJAX [Asynchronous JavaScript And XML] arose as a new means to create interactive Web pages. Microsoft rolled out ASP.NET AJAX extensions to help developers cope. But, while AJAX is powerful, it can also be hard to work with. Some tips from online giant Yahoo have value for any would-be AJAX front-end developer.

In a recent blog on "Best Practices for Speeding Up Your Web Site," the Yahoo developer's forum highlighted a number of key elements for fast websites. They highlighted 34-best practices divided into seven categories: 1) content; 2) server; 3) cookies; 4) CSS; 5) JavaScript; 6) images; and 7) mobile.

Top-of-the-list recommendation is making fewer HTTP requests. The authors note that 80% of end-user response time is spent on the front-end downloading page components like images, stylesheets, and scripts. The easiest way to do this is to simplify the page's design and combine files, scripts, and CSS.

Using a content delivery network to disperse the delivery of static content can also make a big difference. They recommend Akamai Technologies, Mirror Image Internet, or Limelight Networks. Yahoo claims to have improved end-user response times by 20% just by moving the static content to these kinds of services. You can also extend the expiration of these static contents far into the future to reduce new requests because the client can store them locally.

Another strategy is to compress components into Gzip files, which are the most popular and effective compression method at this time. This can reduce the size of files by an average of 70%. In rare cases, this can create problems, but this is becoming less of an issue as the use of older browsers drop off.

You can also move stylesheets to the head of the document, to make the page appear to load faster, because the page renders progressively. Older browsers are unable to render content progressively when the stylesheet is at the bottom of the document. Scripts on the other hand should be put down at the bottom because they block parallel downloads.

Other components, like JavaScript and CSS should be stored in external documents rather than the main webpage document. Most browsers cache them better when they are stored externally. When stored in the browser, they get downloaded every time the page is opened.

Another trick is to reduce the number of unique host names in a website document. Most browsers have a built in DNS cache that lasts for about 30-minutes by default. When content needs to be pulled from multiple sites, the browser has to do a DNS lookup for each unique host name. But when all of the content comes from one host, the browser only has to do one lookup for the entire web page.

For more great tips and more in-depth specifics, check out the full blog.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
ASP.NET, Ajax and Web application development
ASP.NET Ajax components: Vendor roundtable -- Part 3
Infragistics Silverlight 2.0 chart and gauge components released
ASP.NET Ajax components: Vendor roundtable -- Part 2
ASP.NET Ajax components: Vendor roundtable -- Part 1
Microsoft delivers upgrades in .Net 3.5 SP1 Beta
Advanced Windows Debugging Book Chapter and Podcast
Fast Guide: SharePoint blogs
ASP.NET, Ajax and Web application development Research

.NET Developer
ASP.NET Ajax components: Vendor roundtable -- Part 3
Printing in Windows Presentation Foundation
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer
Check the MSDN Virtual Labs for regular, compelling new content
Book Excerpt: Sams Teach Yourself Visual Basic 2008 in 24 Hours -- Complete Starter Kit
ASP.NET Ajax components: Vendor roundtable -- Part 2
Check out CodePlex for a ton of interesting .NET projects
ASP.NET Ajax components: Vendor roundtable -- Part 1
Nick Allen's tips for developing SOA for .NET
Microsoft Popfly turns online visual tools to good use

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
scripting language  (SearchWinDevelopment.com)
static analysis  (SearchWinDevelopment.com)
Visual Basic  (SearchWinDevelopment.com)
Visual Studio .NET  (SearchWinDevelopment.com)
Windows CardSpace  (SearchWinDevelopment.com)
Windows Communication Foundation  (SearchWinDevelopment.com)
Windows File System  (SearchWinDevelopment.com)
Windows Presentation Foundation  (SearchWinDevelopment.com)
Windows Workflow Foundation  (SearchWinDevelopment.com)
XAML  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts