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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:03:03+00:00 2026-05-30T03:03:03+00:00

I’m trying to determine when to provide static HTML vs. when to generate HTML

  • 0

I’m trying to determine when to provide static HTML vs. when to generate HTML as needed by PHP. By that I mean when a user requests a page, is it already waiting in HTML form or is it generated by PHP, and then sent as HTML.

More specifically, what is the best option for user public pages similar to your public pages for Facebook, Linked In or similar.

If the page is for the “content generator” it needs to be generated by PHP as the content is dynamic. The assumption or general case assumes that the user updates his data as needed or at each login.

If the page is for the “content requestor” of the user’s data the page is static…it does not change as long as the user has not logged in and changed it. Hence it would make some sense to generate a static file in HTML that is served to the the requester of the user’s data. Suppose there are 10 or so requests for the public page in between the generator’s login sessions…this would save 10 server “loads” to generate the data as they are already waiting in static form.

Please note the distinction between the user generating the content “the generator” and the user requesting a public type page – “the requester”

I would like to know if someone can validate this approach. Generating Static Files of HTML that are used in between “generator” updates. This is a validation question. Is this a valid approach?

  • 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-05-30T03:03:04+00:00Added an answer on May 30, 2026 at 3:03 am

    Just about any web application that includes any dynamic information at all, even stuff like printing the day’s date at the top or filling in a copyright notice at the bottom, will use dynamically generated pages.

    However that doesn’t mean that the pages are dynamically loaded on each page load. Instead, there may be some caching going on to limit the server’s workload regenerating mostly-static content. (Talking about caching the generated content on the server here, not in the browser’s cache). Templating systems like Smarty do this, and most CMS systems will have some sort of cache machinery to do this as well.

    You will want to look into PHP caching mechanisms.

    However, this is only necessary if your website is not scaling appropriately right now. In other words, don’t worry about caching unless your server cannot keep up with the current load.

    Edit: For clarity, this kind of caching is unrelated to opcode caching, and is used instead to pre-render as HTML compute-intensive or database-intensive data. The cached file is served to clients until it is deemed to be expired, then the full page rendering must take place again, hitting the database for up to date data.

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

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.