PDA

View Full Version : Localized jquery file for Ultimate Fade in Slideshow?



mag3
11-12-2012, 03:56 PM
1) Script Title: Ultimate Fade-in slideshow (v2.4)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

3) Question: Have been working successfully with the above script for some time. But I now have a concern in re: SSL.
I have acquired an SSL certificate for my site, but the system/browser won't fully recognize the site as secure, due to the reference
to the ajax jquery js file in re: "Ultimate slideshow"...


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

I was hoping that I could actually download the latest jquery file and use it locally on the site, but that doesn't seem to work for some reason. Perhaps it may be as simple as rendering a proper *.js file (i.e. unicode and not ANSI or whatever), or some such other thing. Not sure.

Any advice, greatly appreciated.

Regards,
Arnold.

jscheuer1
11-12-2012, 04:13 PM
First of all, this script should probably be using at least jQuery 1.6.4 now. So -

1) You can use Google's ssl server"


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

2) Or you can download and host your own copy (right click and 'Save As'):

http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js

3) Or you can (works only on a live page) skip the protocol:


<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

That way if it's a secure page, it will use the secure version (https:), and if it's a regular page it will use http:

I actually prefer this last option because then it will work on either type of page as long as it's live. The advantage of using Google (options 1 or 3) is that chances are your visitors will already have the script cached. If your users are likely to be in another country though, it might be better to either host it yourself (if your server is also in that country) or find a widely used third party host (like Google is here in the states*) in that country that hosts the script.

I just reread your post and I'm not sure what the problem is you're having hosting the script on your server. If you continue to have trouble with that after downloading a fresh copy of the script from the link above and want help with it, please post a link to a page on your server that demonstrates the problem.



*Google has hosts in many other countries. If you're in that situation, you could perhaps use one of those.

mag3
11-12-2012, 05:46 PM
Thanks very much. I'll most likely try #3, for the reasons you state. My target audience would be the USA primarily, anyway. :)


Regards,
Arnold.

Actually, 1) & 3) both work fine. If I put my site through the Why No Padlock (http://www.whynopadlock.com/check.php) test, it now passes that with flying colors. However, the browsers still do not recognize the site as "secure," indicating that there is still some insecure content present. I think that I still may have some explicit insecure href's in the code that I'll have to convert to https:, or have the content localized.

Thanks again.

Regards,
Arnold.

jscheuer1
11-12-2012, 08:14 PM
If you provide a link to the page, I can see if anything jumps out at me.

When testing in a browser though, make sure you've cleared the browser's cache and reloaded the page, otherwise you might be testing an old cached copy of the page.

To double check after clearing the cache and refreshing, if that doesn't fix it, would be to try the page without the Google hosted script on it. The slideshow won't work and there will be an error, But if that fixes it, you will probably need to host the jQuery script yourself. If that doesn't fix it, then yes, there's something else on the page casing the problem. Perhaps an iframe with its href set to "about:blank". Some scripts will create these, or it may be hard coded on the page. Either way, it would trigger a security violation, even though it's not. You have to edit the script or tag to point to a blank page on the ssl server. An AJAX call to an http: page could also do that to, as would say a YouTube (YT does have a secure server though if you need to use it) or other hosted video. Ultimate fade doesn't do anything like any of those. Are you using any iframe, any video, or any other scripts on the page?

mag3
11-12-2012, 09:09 PM
I'm definitely clearing cache, so that's not it. The source for the pictures that I'm using in Ultimate fade is also not secure (it's a different personal site) and I am using explicit hrefs (http:'s) to source that content. I'll test this by commenting out the entire block of code and retrying. I'll also search the entire code for any other unsecure hrefs. If that works, then I have a decision to make about the source for the pics. Most likely, I'll have to localize the source pics onto the secure platform and use relative hrefs. I'm definitely not using iFrame or video, or anything like that. AFAIK, all other scripts have localized *.js files, but I will verify.

UPDATE: 6:15p - RESOLVED! The addl. problem was the above source pic hrefs going into Ultimate Fade. Localizing the files did the trick!

Thanks.

Regards,
Arnold.