To ensure the cyber security, JavaScript does not allow a webpage to load extra dataset from another website by default. If you add the resources by using an URL, the error massage Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://cl.ly/2wr4. This can be fixed by moving the resource to the same domain or enabling CORS. will be shown on the console.

This problem can be solved by enabling the CORS in the HTML file. You can add this following snipet to your HTML head.

1
<script type="text/javascript">response.addHeader("Access-Control-Allow-Origin", "http://the_address_of_your_resource");</script>


Reference

[1] CORS Enabled

[2] How does Access-Control-Allow-Origin header work?