Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7864377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:46:12+00:00 2026-06-02T23:46:12+00:00

I want a function that stops a page from loading if Google Plus One

  • 0

I want a function that stops a page from loading if Google Plus One couldn’t load in 5 seconds. In our country sometimes the HTTPS port is blocked by the telecommunications department and we don’t have access to apis.google.com. It is not just slow, we realy don’t have access to the HTTPS port. If this is the case I want some way of stopping the page from loading when we can’t access https://apis.google.com/js/plusone.js. How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:46:13+00:00Added an answer on June 2, 2026 at 11:46 pm

    Just check to see if the Plusone script loads within 5 seconds, like so:

    var i=0, checkPlusone = setInterval(function() {
        if (typeof gapi!='undefined') {
            if (gapi.hasOwnProperty('plusone')) {
                 clearInterval(checkPlusone);
                 console.log('Plusone loaded');
            }
        }
        if (i>5000) {
             clearInterval(checkPlusone);   
             console.log('Plusone not loaded');
             window.location = "http://www.mypage.com/no_plusone.html"; //redirect to error page
        }
        i=i+300;
    }, 300);
    

    FIDDLE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to modify my function that strips the tag from the value of
I just want a function that can take 2 parameters: the URL to POST
Say I want a function that takes two floats ( x and y ),
I'm trying to call a function that contains jQuery code. I want this function
I have x = [false, false, true, true, false] I want a function that
I want a function +++ that adds two mathematical vectors. I could implement vectors
I want to create function that can be used either with Id or by
I want a python function that takes a pdf and returns a list of
I want to build a function that fires with every ajax request. Like showing
I want to make a function that remove any specific word in the content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.