GD Star Rating Plugin Not Properly Working if CloudFlare is On


GD Star Rating is an excellent wordpress plugin that allows reader to rate articles, posts and pages. The ratings (scores) can be used to generate the list of top popular articles. The CDN (Content Delivery Network) such as CloudFlare helps to distribute website workloads among servers that are close to visitors. By using CDN, you might have to change the NAMESERVER records to point to the proxy servers. For example, the cloud flare servers will be contacted first, and they will serve a cached page (static contents, e.g. images, css files etc) from a geographically nearby server if the content is up-to-date.

If you check the HTML source code of a page that is currently on cloudflare, you will notice some code inserted by cloud flare at the header section.

<script type="text/javascript">
//<![CDATA[ try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dokv=abba2f56bd/"},atok:"8f09482ee62bf542d0ab6de57d3006ea",petok:"2f95b7300d08fa7d17807f318f8846950ee73443-1403654273-1800",zone:"codingforspeed.com",rocket:"0",apps:{"ga_key":{"ua":"UA-46665182-1","ga_bs":"2"}}}];CloudFlare.push({"apps":{"ape":"9fda7de45135522de92efe00bd63261f"}});!function(a,b){a=document.createElement("script"),b=document.getElementsByTagName("script")[0],a.async=!0,a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dokv=97fb4d042e/cloudflare.min.js",b.parentNode.insertBefore(a,b)}()}}catch(e){}; //]]>
</script>

Cloudflare is great and the free package is good enough for most non-commercial purposes. However, quite often, the GD star rating is not working properly if you are using word press to do blogging. The GD star rating will stop showing scores and stop at text ‘Loading ..’.

Try the following if you can’t get it working.

1. Login to CloudFlare website, go to the settings and disable “Rocket Loader (Web optimization)”, which will mess up with Javascript in some cases. WHAT IT DOES: Makes your web page load faster with asynchronous loading of JavaScript resources. WHAT TO WATCH FOR: Since Rocket Loader rewrites the way your website page loads, it can impact jQuery and any JavaScript resources like images, ads or third party plugins. If certain images, ads or plugins are not loading on the page or if they are loading in the wrong position, then you have two options:

2. Login to wordpress and go to GD Star Rating section on the left menu bar. Go to settings and tick “Use graphics generator to generate and display static stars images. “, click ‘update options’

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
493 words
Last Post: Using DOMDocument in PHP to Process output HTML
Next Post: Pointer Arithmetic in Delphi

The Permanent URL is: GD Star Rating Plugin Not Properly Working if CloudFlare is On

Leave a Reply