Skip to content

Commit 59588cc

Browse files
author
Emmanouil Konstantinidis
committed
Use headers to prevent caching
1 parent 28b973c commit 59588cc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/js/stores/notifications.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var NotificationsStore = Reflux.createStore({
2626
var tokens = AuthStore.authStatus();
2727

2828
apiRequests
29-
.getAuth('https://api.github.com/notifications?now=' + Date.now())
29+
.getAuth('https://api.github.com/notifications')
3030
.end(function (err, response) {
3131
if (response && response.ok) {
3232
// Success - Do Something.

src/js/utils/api-requests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var apiRequests = {
2121
.get(url)
2222
.set('Accept', 'application/vnd.github.v3+json')
2323
.set('Authorization', 'token ' + AuthStore.authStatus())
24+
.set('Cache-Control', 'no-cache')
2425
.set('User-Agent', 'Gitify');
2526
},
2627

@@ -30,6 +31,7 @@ var apiRequests = {
3031
.send(params)
3132
.set('Accept', 'application/vnd.github.v3+json')
3233
.set('Authorization', 'token ' + AuthStore.authStatus())
34+
.set('Cache-Control', 'no-cache')
3335
.set('User-Agent', 'Gitify');
3436
}
3537
};

0 commit comments

Comments
 (0)