Click here to Skip to main content
15,666,553 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
JavaScript google transliterate API is not serving over https. Im getting below mixed content error . Its working over http website, but not working with https. I have tried to invoke the API in all the below ways.

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure script ''. This request has been blocked; the content must be served over HTTPS.

What I have tried:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="">    
      // Load the Google Transliterate API
      google.load("elements", "1", {
            packages: "transliteration"

      function onLoad() {
        var options = {
            shortcutKey: 'ctrl+g',
            transliterationEnabled: true

        // Create an instance on TransliterationControl with the required
        // options.
        var control =
            new google.elements.transliteration.TransliterationControl(options);

        // Enable transliteration in the textbox with id
        // 'transliterateTextarea'.
    Type in Hindi (Press Ctrl+g to toggle between English and Hindi)<br>
    <textarea id="transliterateTextarea" style="width:600px;height:200px"></textarea>
Updated 3-Oct-18 0:03am
Mohibur Rashid 25-Apr-18 2:57am    
have you tried this ?

1 solution

That API was deprecated seven years ago!
The Google Transliterate API has been officially deprecated as of May 26, 2011.

The deprecation policy[^] says they'll do their best to keep it running for up to three years from that date. After that, they can withdraw the API at any time, without notice.

You might be able to use the upgrade-insecure-requests[^] CSP to force the script to load over HTTPS. But there's no guarantee that it will work, and a very real possibility that Google will terminate the API without notice and break your site.

You'll need to find an alternative API to meet your requirements.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900