This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
$http cache doesn't work for JSONP requests #1947
Labels
Milestone
Comments
I have the same question here, why JSONP is not cached? |
I was wondering the same. |
👍 |
It looks like the problem has to do with the way URL's are constructed for JSONP requests. Angular replaces the JSON_CALLBACK parameter value on each request so the URL is unique each time. This URL mismatch causes the cache to miss. |
this one is related #3073 |
+1 |
👍 great catch |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using the $http with cache doesn't work for JSONP methods. At the moment the cache only works for GET methods, while I think it could be useful to cache JSONP too if the the cache-control headers allow it.
Are there reasons JSONP can't be cached? I think the callback could be a small issue?
After some more research I've found this discussion on the mailinglist and merge request that is looks like it could solve this issue. At the moment the merge request is closed though.
The text was updated successfully, but these errors were encountered: