Skip to content
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

Closed
rodfersou opened this issue Sep 10, 2015 · 4 comments · Fixed by #57
Closed

Caching issues with WhatsApp button #56

rodfersou opened this issue Sep 10, 2015 · 4 comments · Fixed by #57

Comments

@rodfersou
Copy link
Member

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 with javascript.

This page has an example on how to get it working with javascript.

@hvelarde hvelarde changed the title Show whatsapp just on mobile devices Caching issues with WhatsApp button Sep 10, 2015
@cleberjsantos
Copy link
Member

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.

@rodfersou
Copy link
Member Author

@cleberjsantos we don't use memoize in this plugin

@cleberjsantos
Copy link
Member

@rodfersou yes, we use for template render ;-)

@hvelarde
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants