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 151535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:27:54+00:00 2026-05-11T09:27:54+00:00

I am building a simple blog which is viewed single-page (do not worry, it

  • 0

I am building a simple blog which is viewed single-page (do not worry, it is progressively built) and thus I am sending AJAX requests which return HTML to be inserted into the page.

What is the most efficient way to store/cache information (HTML) to be added at a later time into the DOM?

How much information (old entries which the user may return to) dare I save client side using JavaScript considering that they contain HTML for an entire article? Maybe I do not have to save them with JavaScript if I somehow make sure the clients browser cache the AJAX application’s state (e.g. getHTML.php?article=4) so that it returns the HTML without really sending an AJAX request (after it has already been requested once)?

Thanks in advance,

Willem

  • 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. 2026-05-11T09:27:54+00:00Added an answer on May 11, 2026 at 9:27 am

    I would recommend that you cache them somewhere inside the DOM itself, either at their natural place or in a ‘cache’ div, just hide them or their container (visibility: hidden). Move them around the DOM (e.g. final_container.appendChild(cache.removeChild(cached_item))) and show them as required. This should give you the best bang for the buck in terms of memory efficiency, speed and simplicity when dealing with moderate amounts of cached information.

    With the proper cache directives inside your AJAX replies’ headers, the browser might also perform caching for your AJAX replies just like for regular pages.

    Check out this Browser-Side Cache article for ideas, too.

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

Sidebar

Related Questions

I want to build a simple blog which contains: A home page with blogs
I am new to Codeingiter and i am building a Simple Blog. In Post
Hey guys. I'm building a simple blog and have my data returning from my
I'm building a simple code-first MVC 3 blog like application. My model has three
Im building a simple chat client which is only supposed to be able to
I'm building a simple contact form for a website. It does not connect to
I'm building a simple blog-style application. I really only need admin and non-admin users,
Building a simple login page. If the user types in a password and password
I building a simple, 7 page, database driven, website, and I would like to
I have a Django project for a simple blog/forum website I’m building. I’m using

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.