1 Reply Latest reply on Jan 18, 2017 11:01 AM by kerrishotts

    script tag with double slash url src="//file.js"

    sceptict

      Hi,

      I have to include javascript code for etracker in a Cordova app, it´s loading an external js file with

      <script type="text/javascript" src="//path.js"></script>

      Because of the Cordova platform the url is building with file://  instead of http://

       

      If I make a string replace in src="//path.js" to src="http://path.js" it works for the first file, BUT all dependencies in path.js going to file:// and so on...

      Is there any solution to work with relativ double slash urls in Cordova?

       

      br

       

       

        • 1. Re: script tag with double slash url src="//file.js"
          kerrishotts Adobe Community Professional

          Sounds more like a problem with your tracking solution rather than Cordova. "//" is meant as a "relative URI scheme", meaning that if you are on "http", that URI scheme will be used, and if you are on "https", then that will be used. Since Cordova typically executes from the "file://" context, "//" is going to point at "file://".

           

          From the sounds of it, the tracking solution doesn't expect to be run from a "file://" instance. I would either contact them or choose another tracking solution.

          1 person found this helpful