I'm using the out-of-the-box JQuery UI tabs- they work fine on an unsecured page but not on the secure https:// page.
I'm calling my scripts like this:
<script src="//code.jquery.com/ui/1.8.22/jquery-ui.min.js" type="text/javascript"></script>
<script src="//jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
<script src="//jquery-ui.googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script>
Examples here:
http://ntcla.com/fb-static.php and
https://ntcla.com/fb-static.php
(see map at the bottom of the page)
Any help is appreciated!
It looks like there is an SSL cert error on the code.jquery.com link. You could just download it and host it on your own site/CDN.
SSL certificate error will be thrown when you try using any js in following manner
download above files and copy them on your server and access them using relative paths on your script
Related
I'm starting a chrome app. But things like this doesn't work for security reason.
<script src='https://code.jquery.com/jquery-1.11.0.min.js'></script>
<script src='app.js'></script>
So how to add those 2 kind of script to my app?
I tried different things in the manifest file but none of them have been successfull
The simplest way to avoid security issues is to download jquery-1.11.0.min.js and place it in your script directory. This will ensure you won't have security SOAP issues. Then include the files like this:
<script src='/example_local_directory/jquery-1.11.0.min.js'></script>
<script src='/example_local_directory/app.js'></script>
I have added script tag as follows working on a https website.
<script src="http://jsconsole.com/remote.js?xxx-xxxx-x-xx-xxxx"></script>
I replaced the http to https still no luck.
<script src="https://jsconsole.com/remote.js?xxx-xxxx-x-xx-xxxx"></script>
I have downloaded remote.js and added relative path still no luck.
<script src="js/remote.js?xxx-xxxx-x-xx-xxxx"></script>
Any suggestion?
I have a Play framework app which handles sensitive data and so enforces SSL.
I'm building a frontend with React.js , but when I try to load
<script src="https://fb.me/react-0.11.1.js" type="text/javascript"></script>
<script src="https://fb.me/JSXTransformer-0.11.1.js" type="text/javascript"></script>
I get the error
[blocked] The page at 'https://localhost:9443/react' was loaded over HTTPS, but ran insecure content from 'http://dragon.ak.fbcdn.net/hphotos-ak-xpf1/t39.3284-6/10173493_255140104677950_2108691993_n.js': this content should also be loaded over HTTPS.
How can I enforce that the transient dependencies are also loaded via https?
The Facebook "CDN" for React doesn't work over HTTPS right now, sorry. You can instead use cdnjs:
http://cdnjs.com/libraries/react
Your script tags will look something like
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/JSXTransformer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script>
Please, help include custom javascript library "jquery-EmbedPicasaGallery.js" to google site.
I tried 3 methods and always have error:
failed to load external url jquery-EmbedPicasaGallery.js
I tried:
.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://googledrive.com/host/0BziEumkvYpL6Ql9NRFhET2FXM1E/jquery-EmbedPicasaGallery.js"></script>
.
<script type="text/javascript" src="https://docs.google.com/uc?id=0BziEumkvYpL6ZmlHZ2FWQ1NrVG8"></script>
.
<script type="text/javascript" src="https://docs.google.com/uc?id=0BziEumkvYpL6ZmlHZ2FWQ1NrVG8&export=download"></script>
Have you tried downloading the script and running it from your own server?
Is your site being tested on a server, or locally?
It is common for errors to occur when attempting certain things locally, so make sure to run on a server, especially in cases involving php, ajax, canvas image data, http headers, and cookies, to name a few.
Right now I have the following links in my code:
<script src="#Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
etc ...
I'd like to make use of the google.com cached copies. I heard google is the best source but please correct me if I am wrong.
Anyway is it possible for me to code my application so it uses code from google if available and locally if not. FYI I am using Microsoft MVC3 and the Msoft cloud servers.
Thanks
Sure, check out how they do it in HTML5 boilerplate.
If you take a look at the bottom of the index.html file within the GitHub repo, you'll see the following...
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/X.X.X/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="local/jquery-X.X.X.min.js">\x3C/script>')</script>
NB: In the code snippet above X.X.X should be replaced with the jQuery version number that you're using (e.g. 1.8.2).
How does it work?
First, an attempt is made to grab the CDN version (Google's CDN url is used above, but of course you could link to any source you like).
Immediately afterwards, we check for the jQuery global object.
If jQuery does not exist, the obvious assumption is that we didn't manage to get the code from the CDN, so then we document.write a script tag to get a copy from a local source instead.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="#Url.Content("~/Scripts/jquery-1.4.4.min.js")">\x3C/script>')</script>