Unable to connect to xmpp using converse.js - openfire

I have an HTML file in which I am including these lines.
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/css/converse.min.css">
<script src="https://cdn.conversejs.org/dist/converse.min.js"></script>
<script src="index.js"></script>
and my index.js contains this code.
converse.initialize({
bosh_service_url: 'http://localhost:7070/http-bind/',
console.log(bosh_service_url)
jid: 'admin#localhost',
password:'root'
});
so can anybody tell me what I am doing wrong here. I am getting no response message on console(not even error). I think there is some problem with this bosh url. I am not getting any active client session in openfire.

I'm pretty sure that that console.log() statement messes up your configuration object. I'd remove that.
Also, this assumes that the browser can reach your instance of Openfire on 'localhost' (port 7070) which will only work in browsers that are opened on the same machine as where Openfire is running.
Finally, your JID includes 'localhost'. Is that the XMPP domain name that you have configured in Openfire (which, at best, is a very confusing value to use)?
You can lookup the configured values for the XMPP domain (which you need to use as part of the JID), but also the fully qualified domain name of the server (which you should use as part of the BOSH service URL) on the first page (after login) of the Openfire Admin Console.

Related

Is there a way to get https version of amazon banner?

I'm trying to show amazon banner on my website. Here's the banner's default code:
<script type="text/javascript" language="javascript">
var aax_size='160x600';
var aax_pubname = 'username';
var aax_src='302';
</script>
<script type="text/javascript" language="javascript" src="http://c.amazon-adsystem.com/aax2/assoc.js"></script>
This is the error I'm getting if I don't change the http link:
first:1 Mixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure script 'http://c.amazon-adsystem.com/aax2/assoc.js'. This request has been blocked; the content must be served over HTTPS.
Now if I change the url src as https://c.amazon-adsystem.com/aax2/assoc.js. The amazon banner is loading but the padlock is breaking with the following message in the console:
Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure frame 'http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com'. This request has been blocked; the content must be served over HTTPS.
The above url http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com is in the javascript hosted by amazon which I can't change. Is there a way to fix it?
Most services which support https but provide http will accept https://our.site.com as an alternative to http://our.site.com. Have you tried just changing the protocol from
"http://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com"
to
"https://s.amazon-adsystem.com/iu3?d=assoc-amazon.com&rP=https%3A%2F%2Fexample.com"
just clear your browser cache or try it in private/incognito window with your HTTPS changes. It can be a browser level issue.
As amazon is using Protocol Relative URL in this script. So there is no where hard coded http or https.
You can view the same by beautifing the code in http://c.amazon-adsystem.com/aax2/assoc.js
By changing http:// to https:// it worked for me.

Cloudflares rocket script

I saw some code for something called rocketscript. I searched the name and it only came up with stuff about WordPress, but I finally found something on the cloudflare website. It just gives information about what it is, and what it does, I seen on another site that the snippet of code they have like the one below is custom, and has their domain / a unique id in it.
I was wondering how can I get my own code for my website? I can't find any page where cloudflare will give me the code, or tell me how to implement it into my website, do I just copy the code from another website? I don't think I do as each code has the websites domain and a unique id.
<script type="text/javascript">
//<![CDATA[
try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok3v=1613a3a185/"},atok:"0c520450ae00f93ad3c6d427e6175e11",petok:"39b2bad3263429bff6b9dfc54bc4b070f517b5df-1443920379-1800",zone:"fabborp.co.uk",rocket:"a",apps:0}];document.write('<script type="text/javascript" src="//ajax.cloudflare.com/cdn-cgi/nexp/dok3v=e9627cd26a/cloudflare.min.js"><'+'\/script>');}}catch(e){};
//]]>
</script>
<script type="text/rocketscript">
//<![CDATA[
try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok3v=1613a3a185/"},atok:"cc7792bcd37b11acfe5d52854c3c31cb",petok:"60a72fe01a43af4ce7bfedbb9aa1557bd41221e9-1437754506-1800",betok:"b5597544ec58644c04609e45c7005743deab17c5-1437754506-120",zone:"fabborp.co.uk",rocket:"a",apps:0}];document.write('<script type="text/javascript" src="//ajax.cloudflare.com/cdn-cgi/nexp/dok3v=e6ea9bd6c9/cloudflare.min.js"><'+'\/script>');}}catch(e){};
//]]>
</script>
Main question is, how do I get my OWN code? for rocketshare..
CloudFlare's Rocket Loader system...
is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload.
You can use Rocket Loader by adding the website you would like to enable Rocket Loader on to CloudFlare. CloudFlare automatically adds the code to every page on your website using DNS, no need for you to add it in yourself.
Sign up for CloudFlare.
Add your website to CloudFlare using CloudFlare's easy to use wizard that should appear after you login.
Select your site from the list that should appear on your screen. A list may not appear as you have only one site in your account.
Select 'Speed' in the navigation bar:
Scroll down to Rocket Loader and select the desired option, probably Automatic.
Give it a little while to propagate, stuff like this doesn't happen instantly.
Hope that works for you!

google translate not showing up when https is used in url

For some reason when you go to the url https://www.improvementskills.org/index.cfm google translate does not show up, but when you go to http://www.improvementskills.org/index.cfm it works fine. So I know the issue is with SSL and having https. Does anyone know what the problem is and how to fix it. Thanks!
You are loading Google's JavaScript with an http URL, even when your page is served with https. The browser rejects that, because it's insecure to include non-https content in an https page.
You need to do this:
<script type="text/javascript" src="//translate.google.com/...
rather than specifying the URL as http://translate.google.com/... By starting the URL at the double-slash, the browser will use whichever of http or https the page itself is using.

Not sure how to fix unsecured content over SSL

My website is here, and visiting it in Chrome gives the 'load unsafe script' error and unsecured content errors in the console. Firefox loads the site, but there isn't a lock.
My site is entirely in PHP, and I'm not sure where to start. The console and firebug said that the site was loading unsecure scripts over HTTP, but how do I make it all HTTPS?
Thanks in advance!
Your HTML has lots of links to http:// resources, eg.:
<link rel="stylesheet" type="text/css" href="http://portal.thespartaninstitute.com/...">
You need to ditch the http: part and just link to //portal.thespartaninstitute.com/... - that will then use https when the page has been loaded that way.

SSL not working completely for a link-sharing website

I got a link-sharing website hosted on linux, which allows users to share links. I purchased a digital certificate SSL 123 to host it in a secure https mode. But the problem is it won't reflect in the address bar as a normal https connection, it displays https with an error:
Your connection is encrypted with 128bit encryption...However, this page includes other resources which are not secure.
I enquired with my hosting company, but they say that because of my website, which allows people to share links, The 'THWATE' company can't verify the other links which have been shared in my website, that is why, it is displaying an error. I am confused as to whether continue with SSL or just host it normally, as I don't want my users to feel insecure about their info.
No the links are not checked but everything you embed in the page is. For example images, scripts that are linked using HTTP. The browser will need to download the linked scripts, images, ... and complains that these were retrieved using http.
This is no problem:
Some link
but these are (EDITED):
<img src="http://example.org/picture.png"/>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Download the scripts using HTTPS
Try to use secure scripts for including the scripts of sharethis.com
Use this script source : https://ws.sharethis.com/button/buttons.js
http://support.sharethis.com/customer/portal/articles/475097-ssl-support