How can I enable caching of HTML and CSS files on an Electron App?

user12270832

I want to enable caching of certain or all HTML and CSS files on my Electron App. I've tried adding the following meta tag to my HTML files and it doesn't seem to do much of anything:

<meta http-equiv="cache-control" content="public/private">

(** I used "public/private" to indicate I've tried both values separately)

I'm simply wondering if Electron has a built-in method for caching files or if the meta tags should be working. I tried searching for cache documentation on Electron's Website to no avail.

I read somewhere that caching is enabled by default on Electron but it doesn't appear to be working too well.

Thank you.

Nick Schroeder

Looks like the session module in Main is how to definitively enable it.

session.fromPartition(partition[, options]) - partition String - options Object (optional) -cache Boolean - Whether to enable cache.

https://github.com/electron/electron/blob/eed72c35d74947853ed75dd10e85d5ed56c1ce86/docs/api/session.md#sessionfrompartitionpartition-options

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I enable caching for Bundles in MVC5

How can I split the JS and CSS into separate HTML files?

How can i set my html files with css in reactjs

How do I make my Electron app the default for opening files?

how can I loop through files in a folder and subfolders using electron?

How can I get source files from a compiled Electron application?

How can I bring Electron app to foreground every "N" minute?

How can I access multiple instances of mainWindow in an Electron App?

How can I add a custom chrome extension to my Electron app?

How can I use ffplay from Electron.js app?

How can I call server relative URLs in a bundled Electron app?

How can I navigate in electron app from system tray icon

How can I force electron to update rendering based on new css?

Electron app. Multiple html files

How can I include partial html in github's electron framework?

How can I have spaces for CSS files and tabs for html or PHP files in Visual Studio Code?

How I can change the Electron app icon without electron-packager?

How can I enable syntax highlighting for .vue files in Atom?

How can I enable the swagger ui on a jhipster app in prod profile?

How can I enable App Sandboxing for specific build configuration

How can I enable communication between ionic app and browser?

How do I enable the iOS Files app to copy files into my app?

How to enable browser caching of static content(images, css, js) with Tomcat?

How can I implement CSS files in EJS

How can I find CSS files Recursively?

How can I schedule enable/disable an element in html using javascript?

Can I customize Electron tray app?

How can I share files (HTML templates) between App Engine modules?

How can I load external html files?