Speed Up Rendering

Speed Up Rendering

s an ASP programmer, you are no doubt focused on improving the performance of your Web application. You are probably busy improving your database access performance as well as the performance in your COM components, if you are using any. Did you know that you could improve the performance of your Web application by improving the speed at which your browser renders your resultant HTML? To your end user, the Web page loads and renders faster, and wins you the accolades.

This apparent improvement in performance can be achieved by using little-known techniques that can assist a browser as it renders your HTML page on screen. Let’s see how.

Nesting Tables?
One common technique to lay out a Web page is to use HTML Tables to enforce a structure on a page. So if you are building a Web site with a top navigation (nav) bar and two columns?a left nav bar and a right content area?you would build it with one large table with two rows and two columns. In the first row, the columns are merged and a smaller top nav table is inserted. In the second row’s left column, you would include a second table that displays the navigation buttons. In the bottom right column, you would include the actual content of the page within a second table. This nesting of tables within tables produces great results.

To create a Web page that looks like this, you would use the following code:

A browser will not start rendering a page on screen when it finds a TABLE tag unless it receives its corresponding ending tag. So if your entire Web page is within a table that, in turn, is within an outer table, the entire page will not be drawn till the final tag of the outer table has been downloaded. This can cause those momentary pauses in rendering that you see when you visit sites that are bringing down a large amount of data (for example, a search result or a product catalog in an e-commerce site). To prevent this, break your page down into smaller TABLE chunks. As each table’s HTML code is downloaded, the browser will start to render it on screen. To your visitor, the page will appear on screen in gradually increasing spurts and more importantly, the page will “appear” to begin displaying on screen much faster than having to wait for the entire page’s code to be downloaded.

To take the example I outlined above, instead of having a single outer table, break up the page into three separate tables. Use the first table to display the top nav elements, making it sufficiently wide enough to fit your page content and complete the

code for it. Underneath that, arrange a second table that is ALIGNED left. Use a third table to hold the contents of your page’s body. Since each section is a complete TABLE, each section will get rendered as soon as the code for the section is downloaded. So your top nav bar and the left nav bar will be rendered far earlier than the rest of the page. This gives the illusion that the page has started to download and will be on the screen any moment, rather than have the user stare at a blank white screen and get disillusioned.

Use the following code:

Remember to Close Other Tags Too!
Just as closing your TABLE tags early helps your browser to render the table data quickly, there are a couple of other often-used tags that also benefit from this same technique. These are the

  • tags to generate Bullet list items.

    Often, the ASP programmer will access a database and construct the

    So, instead of using this code:

    Do while not objRS.EOF  strOptionList = strOptionList & “

    Simply change one line of code:

    Do while not objRS.EOF  strOptionList = strOptionList & “”  objRS.MoveNextLoopResponse.Write “

    Instead of using this code:

    • Apples
    • Oranges
    • Bananas

    Use this:

    • Apples
    • Oranges
    • Bananas

    And viola, your page will appear faster in your user’s browser.

    I am not belittling the importance of improving your ASP performance; I will be devoting future columns to this concept. However, among the slew of “tips and techniques” that you can find in books and online, one tends to forget that by making these simple changes to your HTML code, you stand to gain a lot in terms of page rendering time and apparent speed of your Web application.

  • devx-admin

    devx-admin

    Share the Post:
    Poland Energy Future

    Westinghouse Builds Polish Power Plant

    Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at

    EV Labor Market

    EV Industry Hurting For Skilled Labor

    The United Auto Workers strike has highlighted the anticipated change towards a future dominated by electric vehicles (EVs), a shift which numerous people think will

    Soaring EV Quotas

    Soaring EV Quotas Spark Battle Against Time

    Automakers are still expected to meet stringent electric vehicle (EV) sales quotas, despite the delayed ban on new petrol and diesel cars. Starting January 2023,

    Affordable Electric Revolution

    Tesla Rivals Make Bold Moves

    Tesla, a name synonymous with EVs, has consistently been at the forefront of the automotive industry’s electric revolution. The products that Elon Musk has developed

    Poland Energy Future

    Westinghouse Builds Polish Power Plant

    Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at the Lubiatowo-Kopalino site in Pomerania.

    EV Labor Market

    EV Industry Hurting For Skilled Labor

    The United Auto Workers strike has highlighted the anticipated change towards a future dominated by electric vehicles (EVs), a shift which numerous people think will result in job losses. However,

    Soaring EV Quotas

    Soaring EV Quotas Spark Battle Against Time

    Automakers are still expected to meet stringent electric vehicle (EV) sales quotas, despite the delayed ban on new petrol and diesel cars. Starting January 2023, more than one-fifth of automobiles

    Affordable Electric Revolution

    Tesla Rivals Make Bold Moves

    Tesla, a name synonymous with EVs, has consistently been at the forefront of the automotive industry’s electric revolution. The products that Elon Musk has developed are at the forefront because

    Sunsets' Technique

    Inside the Climate Battle: Make Sunsets’ Technique

    On February 12, 2023, Luke Iseman and Andrew Song from the solar geoengineering firm Make Sunsets showcased their technique for injecting sulfur dioxide (SO₂) into the stratosphere as a means

    AI Adherence Prediction

    AI Algorithm Predicts Treatment Adherence

    Swoop, a prominent consumer health data company, has unveiled a cutting-edge algorithm capable of predicting adherence to treatment in people with Multiple Sclerosis (MS) and other health conditions. Utilizing artificial

    Personalized UX

    Here’s Why You Need to Use JavaScript and Cookies

    In today’s increasingly digital world, websites often rely on JavaScript and cookies to provide users with a more seamless and personalized browsing experience. These key components allow websites to display

    Geoengineering Methods

    Scientists Dimming the Sun: It’s a Good Thing

    Scientists at the University of Bern have been exploring geoengineering methods that could potentially slow down the melting of the West Antarctic ice sheet by reducing sunlight exposure. Among these

    why startups succeed

    The Top Reasons Why Startups Succeed

    Everyone hears the stories. Apple was started in a garage. Musk slept in a rented office space while he was creating PayPal with his brother. Facebook was coded by a

    Bold Evolution

    Intel’s Bold Comeback

    Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as opposed to the 176% return

    Semiconductor market

    Semiconductor Slump: Rebound on the Horizon

    In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024 approaches, the industry seems to

    Elevated Content Deals

    Elevate Your Content Creation with Amazing Deals

    The latest Tech Deals cater to creators of different levels and budgets, featuring a variety of computer accessories and tools designed specifically for content creation. Enhance your technological setup with

    Learn Web Security

    An Easy Way to Learn Web Security

    The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security. These carefully designed learning courses

    Military Drones Revolution

    Military Drones: New Mobile Command Centers

    The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers to better manage smaller unmanned

    Tech Partnership

    US and Vietnam: The Next Tech Leaders?

    The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like artificial intelligence (AI), semiconductors, and

    Huge Savings

    Score Massive Savings on Portable Gaming

    This week in tech bargains, a well-known firm has considerably reduced the price of its portable gaming device, cutting costs by as much as 20 percent, which matches the lowest

    Cloudfare Protection

    Unbreakable: Cloudflare One Data Protection Suite

    Recently, Cloudflare introduced its One Data Protection Suite, an extensive collection of sophisticated security tools designed to protect data in various environments, including web, private, and SaaS applications. The suite

    Drone Revolution

    Cool Drone Tech Unveiled at London Event

    At the DSEI defense event in London, Israeli defense firms exhibited cutting-edge drone technology featuring vertical-takeoff-and-landing (VTOL) abilities while launching two innovative systems that have already been acquired by clients.

    2D Semiconductor Revolution

    Disrupting Electronics with 2D Semiconductors

    The rapid development in electronic devices has created an increasing demand for advanced semiconductors. While silicon has traditionally been the go-to material for such applications, it suffers from certain limitations.

    Cisco Growth

    Cisco Cuts Jobs To Optimize Growth

    Tech giant Cisco Systems Inc. recently unveiled plans to reduce its workforce in two Californian cities, with the goal of optimizing the company’s cost structure. The company has decided to

    FAA Authorization

    FAA Approves Drone Deliveries

    In a significant development for the US drone industry, drone delivery company Zipline has gained Federal Aviation Administration (FAA) authorization, permitting them to operate drones beyond the visual line of

    Mortgage Rate Challenges

    Prop-Tech Firms Face Mortgage Rate Challenges

    The surge in mortgage rates and a subsequent decrease in home buying have presented challenges for prop-tech firms like Divvy Homes, a rent-to-own start-up company. With a previous valuation of

    Lighthouse Updates

    Microsoft 365 Lighthouse: Powerful Updates

    Microsoft has introduced a new update to Microsoft 365 Lighthouse, which includes support for alerts and notifications. This update is designed to give Managed Service Providers (MSPs) increased control and

    Website Lock

    Mysterious Website Blockage Sparks Concern

    Recently, visitors of a well-known resource website encountered a message blocking their access, resulting in disappointment and frustration among its users. While the reason for this limitation remains uncertain, specialists