Generate Static HTML for anonymous users only
Created by: PubliAlex
Hello,
I noticed something really annoying with this module.
It actually cache static HTML file as it's viewed. This means it will cache and serv to everybody all administrative tools you can have on your frontend as a website administrator.
Here is a small example : Let's imagine you use the excellent content editor plugin to manage your frontend texts. The page will be cached including that small blue pen on the top left corner of each pages. Once cached, even anonymous visitors will see this pen, and they will see all others tools of special classes an administrator could have on a website frontend. This can lead to big UI and security issues.
There are 2 things to do to correct that problem :
-
Be sure that, when you cache the page, you cache only anonymous version of pages (anonymous from backend, but also from users logged with the user plugin)
-
Serve cached page only for anonymous (people logged as backend admin, or frontend user should not see cached version)
This is what most (to not say all) cms I know do, cached pages are only made for anonymous users, to speedup page load. Once they are connected, pages are dynamically calculated.
Best regards,
Alex