Hi All,
I have a slight concern with a jQuery twitter feed on a potentially high traffic site. I’m aware that Twitter only allows 150 requests per hour and am not sure if it will affect me or not.
Does each unique site visit count as one call or is a call based on new tweets coming in?
Will
$.ajaxSetup({ cache: true });
Cache properly?
Thanks in advance for any input!
If you have JavaScript on your page that calls the Twitter API, then yes, every page view will result in an API call. I don’t know how the jQuery cache works, but it’s going to be client side, so every unique visitor will still be an API call.
However, this particular API call doesn’t require authentication, so it’s going to be coming from each of those visitors. It’s their own rate limits that will be used (based on their IP address).
That’s actually even worse. It’s not bad for you, but it is for anyone that visits your site and also uses Twitter. You could potentially disable their Twitter client by using their API quota faster than it budgeted for.
Putting an RSS feed in your page should be a server-side operation. You can cache the results to a file and only update once every X minutes/hours.
Ahh, I see. I will give that a try.
Thanks a million!