Вопрос

I'm using the Google Login API to verify users on my webapp. I've noticed that Google Login is quite slow. Is there effective way to use the time Google takes by prelaoding images or even loading the next page (where I have a Google map thats quite slow too).

Это было полезно?

Решение

This is an interesting question - since no one else is chiming in I'm going to offer some untested suggestions.

Assumptions:

  • Google Login API can be invoked via Javascript
  • Web browsers cache content loaded via Javascript GET requests

Before (or after?) you start the Login request you could kick off a variety of Javascript requests for content that you are going to need.

  • images
  • CSS files
  • HTML of next page, assuming it isn't tailored to who is logged in
  • Google Maps API javascript files

It might even be the case that loading your Google Map into a hidden div on the login page would make that same map load faster on the next page.

You could also request a memcache populating page that can query the datastore for relevant data based on the unauthenticated username.

Alternatively, you could be loading the entire next page into a hidden div while logging in (login is just a popup or something). Then when login succeeds you make the main div visible and kick off loading the user specific content.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top