Failed loading plugins.

3 replies·opened Jun 8, 2020
P
pnighJun 8, 2020

I have the complete /js folder on the top level and call the files correctly. Any Idea what is happening? The page I am loading is https://sample.com/test/test-01

	<!-- External JavaScripts
	============================================= -->
	<script src="https://sample.com/js/jquery.js" ></script>
	<!-- Footer Scripts
	============================================= -->
	<script src="https://sample.com/js/functions.js" ></script>

I get this error:

Refused to execute https://sample.com/test/js/plugins.shapedivider.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.

S
SemiColonWebSTAFFJun 8, 2020

Hello,

Apologies about the Inconveniences caused!

The New js/functions.js File uses Async JS Loading. By default, all the plugins.*.js Files are in the same Folder as js/function.js File and are loaded from the js/ Folder. However, in case, if your js/ Folder is at a different location you can simply add the following code anywhere on your Page just before the js/functions.js JS File Linking:


window.scwJsPath = 'https://sample.com/js';

This would make sure that the Plugins JS Files are always loaded from this Folder.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

P
pnighJun 8, 2020

So in order to work on canvas 5 and the new v6, I put the new /js folder at the root and renamed it /js-new. Would this work?

	<!-- External JavaScripts
	============================================= -->
        <script>window.scwJsPath = 'https://sample.com/js-new';</script>

	<script src="https://sample.com/js-new/jquery.js" ></script>
	<!-- Footer Scripts
	============================================= -->
	<script src="https://sample.com/js/functions.js" ></script>

Thanks!!

S
SemiColonWebSTAFFJun 8, 2020

Hello,

This is just required if you are using Canvas 6. And yes this would work.

Let us know if you face any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard