dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Calling A Secure Script from an Unsecure Page

  1. #1
    Join Date
    Mar 2006
    Posts
    73

    Calling A Secure Script from an Unsecure Page

    Good day, all,

    My Google-fu is apparently pretty weak today. I'm unable to find a good reference for this problem I'm having on a client's site.

    They have a script on their remote, secure server and our pages (some of which are secure and some which are not) call it.

    The problem appears to be on the unsecure pages calling the client's remote, secure JS file. I'm told that on FireFox and Chrome, it times out and produces an error on our back-end.

    Has anyone heard of this issue before?

    How can it be addressed?

    Yours,
    Dave

  2. #2
    Join Date
    Apr 2007
    Posts
    1,664
    What's the error and can it be reproduced? You should be able to include a remote JS file even if it's from a secure server. It's probably just a regular coding problem and you're getting drawn away by the remote and secure aspect of the include.

    A couple of things to try are.
    Copy the JS file and run it locally to be sure it's OK.
    Include just the JS file in a simple test script and execute one of its functions.
    Make sure the URL to the secure file is using the correct protocol.

    It also could just be a crap remote server that is simply timing out a lot. If the error is intermittent and unrepeatable, and runs 100% OK when copied locally, that's the likely answer.

  3. #3
    Join Date
    Mar 2006
    Posts
    73
    Quote Originally Posted by SyCo View Post
    What's the error and can it be reproduced? You should be able to include a remote JS file even if it's from a secure server. It's probably just a regular coding problem and you're getting drawn away by the remote and secure aspect of the include.
    I'm afraid the UNIX developer who reported the problem has been unable to demonstrate it for me. Essentially, he's seeing it in reporting on the server: something I know nothing about.

    Quote Originally Posted by SyCo View Post
    A couple of things to try are.
    Copy the JS file and run it locally to be sure it's OK.
    Include just the JS file in a simple test script and execute one of its functions.
    Make sure the URL to the secure file is using the correct protocol.
    Agreed. My problem with these are that the file cannot be run locally (something on the client's server is working with the JS file) and the functions appear to be working just fine.

    Quote Originally Posted by SyCo View Post
    It also could just be a crap remote server that is simply timing out a lot. If the error is intermittent and unrepeatable, and runs 100% OK when copied locally, that's the likely answer.
    This may be it.

    It seems to only happen on Chrome and Firefox and the error -so our UNIX guy says- is a timeout error.

    Have you ever heard of such a circumstance where IE will not timeout but Firefox and Chrome will when attempting to reach a securely stored .js file from a page that is not secure?

    Yours,
    Dave

  4. #4
    Join Date
    Apr 2007
    Posts
    1,664
    Quote Originally Posted by Sylvan012 View Post
    I'm afraid the UNIX developer who reported the problem has been unable to demonstrate it for me. Essentially, he's seeing it in reporting on the server: something I know nothing about.
    Well then there's no way we'll ever know either, so makes fixing it a bit tough. Then there's the possibility there's someone here (on WD) who will know what the error means, which is why posting the error is always useful.

    If you can make the error happen on demand it's a code thing. It might require a weird set of circumstances to reproduce but eventually you'll be able to make it happen on demand. It you can't, it's not a code problem.

    Quote Originally Posted by Sylvan012 View Post
    Agreed. My problem with these are that the file cannot be run locally (something on the client's server is working with the JS file) and the functions appear to be working just fine.
    Run it locally for testing only. You can then rule out errors in the script causing the problem. JS files are static, you can just visit the address of the JS file in a browser and copy past and save locally. I'm sure you're not using AJAX on the remote server, because you would have said...right?

    Quote Originally Posted by Sylvan012 View Post
    This may be it.

    It seems to only happen on Chrome and Firefox and the error -so our UNIX guy says- is a timeout error.

    Have you ever heard of such a circumstance where IE will not timeout but Firefox and Chrome will when attempting to reach a securely stored .js file from a page that is not secure?
    This happens primarily because no one uses IE, lol. Seriously, timeout errors are because of problems serving the file not how the browser accepts it. The error is how the file is created or served.

    There may be other suggestions but basically I think your UNIX guy sucks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles