3 ms·
Very cool idea! > ... With proper E-Tag checking, Github won't even count repeated API queries against the rate limit ... Does this behavior rely only on the
by vmorgulis 11y ago
Very cool idea!
> ... With proper E-Tag checking, Github won't even count repeated API queries against the rate limit ...
Does this behavior rely only on the browser side? Did you add something in javascript?
- ThePhysicist 11y agoYou need to pass the ETag header in the Ajax request, though jQuery might do this automatically (have a look at the utils.js in Gitboard: http://github.com/adewes/gitboard http://github.com/adewes/gitboard). As long as you set it and the data is unchanged you can poll for it as often as you want, which us perfect to watch for changes.
- mwpmaybe 11y agojQuery doesn't automatically attach the ETag, but the browser does.
- vmorgulis 11y agoSo etags should work with JSONP call... I found that: http://fitzgen.github.io/github-api/ http://fitzgen.github.io/github-api/
- ThePhysicist 11y agoI think you don't even need JSONP, just make sure to set the cross-domain headers and it should work.
- vmorgulis 11y agoThank you a lot! I missed that part: https://developer.github.com/v3/#conditional-requests https://developer.github.com/v3/#conditional-requests "Also note: making a conditional request and receiving a 304 response does not count against your Rate Limit, so we encourage you to use it whenever possible."