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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:15:08+00:00 2026-05-29T05:15:08+00:00

In relation with my early question of how to add manifest cache in node.js,

  • 0

In relation with my early question of how to add manifest cache in node.js, my question now is related with how to cache the HTML generated by node.js. As we didn’t have a physical file like in php (index.php) we cannot cache such kind of files.

How we can cache a “non existing” page? Just adding in cache:

    CACHE MANIFEST

    CACHE:
    # plain files to cache
    /javascripts/client.js
    /stylesheets/style.css
    /stylesheets/style.styl
    # generated files like /
    /
    /content

Any idea of how to solve this problem?

Thanks!

Solution:

Add router to return the cache.manifest file with the correct mime-type:

app.get("/offline.manifest", function(req, res){
  res.header("Content-Type", "text/cache-manifest");
  res.end("CACHE MANIFEST");
});

Found at stackoverflow

  • 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-29T05:15:09+00:00Added an answer on May 29, 2026 at 5:15 am

    The cache manifest list URLs that should be cached. The client accessing those urls has no knowledge whether these are static html files on top of Apache or dynamic content generated by node.js or anything else.

    You are basically instructing the client:

    1. Read my list of urls
    2. Go through each url
    3. Download the response and store it someplace safe
    4. Check back on my cache.manifest if it has changed and then proceed to step 1

    So as long as your data generated by node.js is reachable via a URL there is no problem in defining it as a line in the cache manifest.

    And if you are worried “how will I know which urls there are” you can always generate the cache.manifest file programmatically from node.js itself — but remember to serve the correct content-type text/cache-manifest

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

Sidebar

Related Questions

In relation to my question here , I have a plot for which the
In relation to this question ( Efficient hashCode() implementation ) I have one more
My question is in relation this this answer. https://stackoverflow.com/a/8773953/1297775 I have read at many
In relation to this previous question I am trying to create a batch file
I have database relation as follows between question table and Hardware detail table .
In relation to my other question, I have serialized data and then deserialized it,
In relation to question an eralier question of mine, I have tried and failed
This question is in relation to a Plugin which I am now creating for
This question is in relation to a question I posted yesterday. The link -http://stackoverflow.com/questions/12636348/how-to-add-a-different-class-to-the-same-class-in-jquery
Relation between idc=courseID HTML of Grid view <asp:GridView ID=GridView1 runat=server AutoGenerateColumns=False DataKeyNames=id DataSourceID=EntityDataSource1> <Columns>

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.