Start a new topic

Resources will not load when the content URL contains a # hash (fragment)


API's such as AR.TargetCollectionResource, AR.ImageResource, ...etc will not correctly load resources when the URL of the main content contains a # hash (fragment)

For example, if my AR content is located at 


and I have resources at





 AR.TargetCollectionResource("assets/", {});


will result in sending http requests like...



to the server.

and thus result in 404 not found response.

I'm using Javascript SDK version 7.2.1.  This problem can be verified by placing an AR content on a server and designate the URL (with hash) using the "Manage URSs" -> "Custom URL's" in the SDKExample app.

line 166-170 in architect.js 

    var b = document.baseURI.substring(0, document.baseURI.indexOf("/") + 2),
        c = document.baseURI.substring(document.baseURI.indexOf("/") + 2);
    c.indexOf("#") > 0 && c.length > c.indexOf("#") + 1 && (c = c.substring(0, c.lastIndexOf("#")), "/" !== c[c.length - 1] && (c += "/")), c = c.substring(0, c.lastIndexOf("/") + 1);
    var d = b + c;
    return "/" !== d[d.length - 1] && (d += "/"), "/" === a[0] && (d = d.substring(0, d.indexOf("/", d.indexOf("//") + 2))), d + a

 is not returning proper URL.

Thank you Alex... I'll wait to see the next beta release...


thank you for reporting this issue and providing a thorough explanation.

We could already fix this issue and it will be included in the next release. Please checkout the next beta version of the JS SDK, which we plan on releasing this week, to verify if this fixed the issue for you.

Best Regards,


Login or Signup to post a comment