0

I have noticed that signing into my Gmail account, automatically causes some webpage to refresh. For example, signing into Gmail while keeping http://poetsandquants.com/2014/01/10/the-spaceship-enterprise-comes-to-yale/ open in another tab causes the page to refresh once signin/out is done.

  • How is this done?
  • I am guessing this is some sort of tracking mechanism. Is this a known "feature" and legal?

How can I implement this for my own website?

2
  • This question appears to be off-topic because it is not about a website you control. – John Conde Jan 15 '14 at 17:22
  • 2
    Yeah, I'm not sure if this is on-topic at any SE site. But Stack Overflow chat might be the best place to ask. – John Conde Jan 15 '14 at 17:22
1

Once you sign in with your browser to your google account, all the open webpages with a Google +1 button automatically refreshes(same case here for the link you provided). This is not implemented by the website perse. Rather, this is a property of the Google +1 button. The Google +1 button is inserted as an iFrame in the page, with a javascript code that somehow initiates a refresh of the iFrame and/or the original page. Details, somebody with js knowledge can firebug an example page and tell you. This is done so as to prevent users from +1ing a post two times. The default colour of the +1 button will be white/transparent and once you +1 it, it turns red preventing further +1ings. Refreshing the page upon login prevents this from happening.

This is known feature and because it is done by mighty Mr.G, we will have to think that this is legal.

In order to implement this on your website, you will have to add a Google +1 button to your site.

2
  • Does having the +1 button, mean that the site owner can know who is visiting the web page, if the visitor is logged in? – bobby Jan 16 '14 at 15:50
  • I have confirmed that it s the Google+1 button which causes the refresh. I found this by enabling Ghostery. – bobby Jan 17 '14 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.