Announcement

Collapse
No announcement yet.

Website attempting to load a JS from an external source

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Website attempting to load a JS from an external source

    Me again,

    I have an issue with the loading speed of my web site, and my provider has found the cause as follows :

    "And I was able to reproduce the issue with the loading time of your website.

    After investigating it for a while I found out that your website is attempting to load the following JS from an external source:

    https://teclan.secured-area.co.uk/lib/teclan-lib.js

    But since this URL/JS file in particular doesn't appear to be reachable, the request to it occasionally fails in about 20 seconds and this causes the pages to load with a delay.

    You will need to check your website's code and remove requests towards this file/URL in order to resolve the issue with the delay. I recommend reaching out to your website's developer and have them look into this further."


    This is obviously from a Teclan plug-in we either used or currently use but we don't have a developer to ask. I have contacted Teclan to see if they can help. No reply so far, but I did just email this morning.

    I have found the relevant link in the Design Library, and it is contained in a layout (?) called "teclanLibraryCall", which I cannot delete as it is in use by all accounts. I cannot, however, find any reference to this in the page designs and I wondered if anyone can tell me how to find it?

    Ta for now,
    Steve

    #2
    That file is accessible via

    So you could modify layout teclanLibraryCall to use this instead.


    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman,

      Many thanks for that. Teclan have kindly sent me the js file for inclusion in the Site1 folder, and I have modified the code accordingly (to src="teclan-lib.js). In theory better this way as that file may, I suppose, disappear from that url in the future as well?

      I also included the file in the "additional files" just to be belt and braces and have checked that it is present in the acatalog folder on the server.

      Now, I uploaded the files and no change, published the site and no change, refreshed the site and no change. I am wondering if there is another instance of this link, but I have been unable to find it.

      I have contacted Teclan again to get their view and will post when I have something else to say.

      Cheers for now,

      Steve

      Comment


        #4
        Saying "and I have modified the code accordingly" doesn't tell us anything useful.

        If you tell us step by step what you've done then perhaps we can say whether it's correct or not.

        To locate Teclan code, go to Design / Library / Layouts. Right-click the top item and choose "Find". Enter teclan-lib and check the Code check box. Now you can locate all instances that may be loading that library.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thanks again Norman,

          I searched for any other instances, and there aren't any. I changed the Teclan Library Call code to :

          <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
          <script language="javascript" type="text/javascript" src="teclan-lib.js"></script>
          </actinic:block>
          <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
          <script language="javascript" type="text/javascript">
          var ahost = document.location.protocol == "https:" ? "https://teclan.secured-area.co.uk/" : "http://www.teclan.com/";
          document.write(unescape("%3Cscript src='" + ahost + "lib%2F" + "teclan-lib." + "js' type='text/javascript'%3E%3C/script%3E"));
          </script>
          </actinic:block>


          This was suggested by Teclan, but after a subsequent query to them they have suggested changing the code further to the following :


          <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
          <script language="javascript" type="text/javascript" src="teclan-lib.js"></script>
          </actinic:block>
          <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
          <script language="javascript" type="text/javascript" src="teclan-lib.js"></script>
          </actinic:block>


          I'll try and let you know how I get on.

          Regards,
          Steve

          Comment


            #6
            Yup, that latest change has nailed it!

            Hope this helps someone out there as there must be others with Teclan plug-ins, and they have been very helpful in sorting it out.

            Comment


              #7
              All you need is:
              Code:
              <script type="text/javascript" src="teclan-lib.js"></script>
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                I can't help wondering if the preview mode was supposed to load it locally from the PC.
                -----------------------------------------

                First Tackle - Fly Fishing and Game Angling

                -----------------------------------------

                Comment

                Working...
                X