How to exclude the login state in the front page?

#1

How to exclude the login state in the front page? There is an attachment that display on the site below. Are these dynamic elements by cookie and only could be exclude by purchasing the business plan? Please let me know, thank you!

#2

To clarify the original question. I prefer the cache everything for the performance, but it will cache the user’s login information on the page. Refresh doesn’t work. Other user link to the page will also show the same caching page, but this should be the dynamic elements to every single user. Thank you!

#3

Ideally, you should find a solution at the origin level that would generate the HTML of your pages with spaces reserved for iframes (or WordPress embeds) for each non-static component of your pages.

Then you could apply the cache everything page rule and it would cache the HTML with a space reserved for the iframes, which would themselves be subject to another page rule that would make their HTML to not be cached. You’d need the help of a developer to properly implement this. Of perhaps find and test plugins that will do this job.(Let us know if you find them!)

This way both logged-in and logged-out users would benefit from the speed improvement of the cache everything rule.

What you can do alternatively is to have a page rule to cache everything with a setting that will exclude visitors with a cookie for logged in users. This setting is called Bypass Cache on Cookie, a feature that is only available on the Business and Enterprise Plans.

With that enabled, your logged in users will not get a cached page, only logged-out visitors. Since all new visitors coming to your site are by definition logged out, this would improve their experience as first-time visitors, and please Googlebot and other SEO tyrants out there :slight_smile:

Another way would be for the theme or some plugin of your website to redirect all logged-in users to a different path. For example:

www.example.com/some-page/ <- for logged-out users, cache everything
www.example.com/logged-in/some-page/ <- for logged-in users, bypass cache

Not sure how practical implementing such a solution would be, and the consequences as far as SEO etc.

2 Likes
#4

Hello floripare,

Let’s simple to say if I want to make it work fine then need the Business Plan by cookie or I have to separate login and logout users to different paths. Is this correct? Thank you!

#5

AFAIK, these are the two readily available, easier to implement possibilities, for an e-commerce website.

The other way would be something like what I describe at the beginning of my previous reply, which involves either custom coding or finding the right solution for your CMS.