Hi @longnha,
that shouldn’t be the case. Ajax is used only if the rating widget is present on the page. Otherwise the script is not enqueued. Nevertheless, I’m releasing version 2.10 today or tomorrow which uses ajax only if it’s enabled in the settings (for compatibility with a few caching plugins).
Regards,
Blaz
Hi,
It’s concerned because Ajax is loaded where it should not! I used shortcode and call it on single post only, but Ajax is load on every page so I guess something is not right!
Thanks.
Hi @longnha,
version 2.10.0 was released which no longer uses ajax on page load. Previous versions used ajax on page load if the widget was present on the page for compatibility with caching plugins. Now this is handled differently. If ajax was fired on every page load (also where there was no widget) it might be because your were combining JS?
Regards,
Blaz
Thank you for the update. The new version no longer uses ajax.
Another question, can I dequeue all scripts/css and only enqueue it when there is shortcode available? It’s prevent the scripts unnecessary load site-wide.
Thank you.
@longnha,
I double checked this and the plugin loads JS and CSS only where it’s required. So if you are using shortcode the plugin’s CSS and JS should be present only where the shortcode is present. Exception is if you are also using the top rated posts widget or displaying stars on archive pages. Then obviously the CSS is required on these pages as well.
If that is not the case on your website, the problem must be somewhere else. Please share the link to the website and I’ll have a look.
Regards,
Blaz
-
This reply was modified 4 years, 4 months ago by Blaz K..