DEV Community

Discussion on: How I developed and deployed my optimized website within a day

Collapse
 
johnbetong profile image
John Betong

When using a "dynamic content management system" consider retrieving and saving the static web-page content to a cached directory because... two lines in an Apache2 .htaccess file can:

  1. test to see if a cached web-page exists
  2. if the cached file exists then render the cached web-page contents
  3. otherwise fall through, generate the web-page and cache contents

johns-jokes.com/chuck-norris

To demonstrate this in action the above very old site uses this simple technique.

There are over 3,000 webpages, each displays the last cached date (on the right, just above the page title). Refreshing the page will not change the date.

Collapse
 
gmlunesa profile image
Goldy Mariz Lunesa (@gmlunesa)

Thanks for this insight, John!