kylephillips / favorites

Simple and flexible favorite buttons for any WordPress post type.
https://favoriteposts.com
223 stars 86 forks source link

Save favorites_array action result to localStorage #118

Open Slamik opened 5 years ago

Slamik commented 5 years ago

Hello,

I've noticed that at every page load script send ajax request to favorites_array action and gets all user favorites. More favorites, more data every page, more waste of server resources.

If it is important to load this data each time, probably it would be great to use localStorage and update it when new favorites will be added or removed?

Thank you in advance!

jimi008 commented 4 years ago

10-9-2019 6-48-52 PM

The same is observed and it also causes high resource usage in Hosting. Every page is loading this data in spite of Anonymous Users is disabled.

contemplate commented 4 years ago

I was looking for this exact fix ... Thank you!