PostgreSQL storage for prerendered HTML. Automatically creates a table 'pages' and stores the processed HTML as gzipped bytea.
- Good old relational database.
- uses GZIP compression to save storage (it matters if you have 50k pages) .
- in addition to stripping javascript, it also removes inline fonts, inline audio and replaces inline byte64 encoded images with 1px transparent ones.
- stripping happens once before html is stored (as opposed to always stripping before returning to client).
npm install prerender-postgre-cache
Edit server.js:
//server.use(prerender.removeScriptTags());
//Script tags are removed pre-storage, no need to run it
process.env.POSTGRES_URI = "postgres://<user>:password>@<host>/<db>";
server.use(require('prerender-postgre-cache'));
server.start();
We build awesome software, web and mobile applications. See more at fadeit.dk