Failed to load resource

Solved
ABCS
Tourist
4 1 0

Hi

 

Just in the process of creating a buy button - everything works smoothly except the arrows for the next and previous product image arent loading.

 

The console tab of chrome dev tools is throwing a "Failed to load resources" error.  The culprit is with the source for the arrow: src="//sdks.shopifycdn.com/buy-button/latest/arrow.svg"

 

If I replace the src with "https://sdks.shopify "..... etc   the image loads fine.  As the source is loaded in the javascript of the buy button I cant figure out a way to manually correct this.  Anyone have any advice?

 

Thanks

Accepted Solution (1)

Accepted Solutions
ABCS
Tourist
4 1 0

This is an accepted solution.

For anyone interested - I figured it out.   Technically there was nothing wrong but I will elaborate.

 

Basically the supplied src was beginning with "//" which is essentially shorthand for whatever protocol is currently being used.   It didn't occur to me at the time that because I was viewing the site locally (but fetching the javascript from the internet) that the script would default to a local source for the images.  

 

When I eventually tested on a live server, the current protocol was then web and it sourced the images correctly.

 

Ultimately nothing to fix - and a simple oversight on my part.

View solution in original post

Reply 1 (1)
ABCS
Tourist
4 1 0

This is an accepted solution.

For anyone interested - I figured it out.   Technically there was nothing wrong but I will elaborate.

 

Basically the supplied src was beginning with "//" which is essentially shorthand for whatever protocol is currently being used.   It didn't occur to me at the time that because I was viewing the site locally (but fetching the javascript from the internet) that the script would default to a local source for the images.  

 

When I eventually tested on a live server, the current protocol was then web and it sourced the images correctly.

 

Ultimately nothing to fix - and a simple oversight on my part.

View solution in original post