Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:30:28+00:00 2026-06-03T02:30:28+00:00

I am creating an application where when a tab is clicked its content is

  • 0

I am creating an application where when a tab is clicked its content is loaded via ajax. The reason for this is to speed up the initial page load, and not to load unnecessary tab content. The tabs contain form items, where values can be changed.

To prevent the data from being lost, When a tab is loaded I am giving it an extra class of “ajaxed”. When the tabs are clicked if the class “ajaxed” does not exist, then the content is loaded via ajax, otherwise the content previously loaded is simply presented to the user.

Quesiton:
Does caching lots of HTML in the dom slow down performance?
Is this bad practice? This applies to infinite scroll and other types of pages where you simply keep appending more and more html. What are the drawbacks of this approach?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:30:29+00:00Added an answer on June 3, 2026 at 2:30 am

    it depends on the area of your application. It surely does not hurt to cache the content of some tabs in the DOM providing that the number of dom elements in those tabs is somewhat limited.

    It is a fact that scripts that use selectors to find elements in your DOM will be slower the more elements there are. This will be even more visible to your visitors when they use a browser with a crappy JavaScript engine like in older versions of Internet Explorer. Also the memory consumption will increase with the number of DOM elements. So you don’t want to add an infinite number of items to your DOM.

    For infinite scroll a good practice would be to unload/remove items when you scroll down too far and re-add them when you scroll up again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an application which displays several pages of content. Typically this is
I'm creating a simple notepad type of application with the tab functionality. I'm creating
I'm creating a notepad type of application which has the tab functionality. I have
I am creating C# application that uses OCX component. I have this component from
I am creating a Tabbar application as shown. On selecting the county a tab
I'm creating a web application which loads tabs using AJAX. My problem is that
I am creating multiple tabs dynamically when my application starts up. Put it this
I am creating a guitar tab display application in Flex and I need to
I'm creating a WPF application containing a Main-Content - Layer containing a TabControl and
I am creating an iPhone iOS Application. I have 3 tabs in a tab

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.