/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@SyCoOct 05.2010 — 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.
Copy linkTweet thisAlerts:
@Sylvan012authorOct 05.2010 — 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.[/QUOTE]

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.

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.[/QUOTE]


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.

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.[/QUOTE]

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
Copy linkTweet thisAlerts:
@SyCoOct 05.2010 — 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]


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.


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]


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?


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?
[/QUOTE]

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.
×

Success!

Help @Sylvan012 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...