-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching issues with WhatsApp button #56
Comments
Hello @rodfersou the problem seems to be with the memoize, it's not being used properly and this is making the cache. I think using more one javascript file will leave minimally loading the plugin and, consequently, the load slowest page. Also, if the cache server caches resources such as javascript, we have iqual problem. |
@cleberjsantos we don't use memoize in this plugin |
@rodfersou yes, we use for template render ;-) |
@cleberjsantos if you're talking about this memoize it doesn't seem to make sense at all as it's a view memoize and for me we're gaining nothing with it. the problem is the following: we are using a moderate caching rule that caches for 15 minutes the content types views; if the first user that visits an item is using a mobile device, the WhatsApp stuff will be in the rendering and will be cached. by moving part of the logic outside the backend into some JS executed by the client, we will avoid that problem; that's the way all other plugins work. |
I know this is already implemented to show just on mobile devices.
But we have a plone site that is showing this button anyway because the site was accessed first on mobile device and our cache server used this generated html on every device, showing the
whatsapp
button at desktop for some pages.The suggested fix is to remove this feature from
python
code, and implement it withjavascript
.This page has an example on how to get it working with
javascript
.The text was updated successfully, but these errors were encountered: