From 924891d95adc967542644dd442339fa411448011 Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Tue, 8 Sep 2026 14:22:48 +1000 Subject: [PATCH 1/7] disable caching for web --- lib/src/solid/api/rest_api.dart | 5 +++++ lib/src/solid/constants/common.dart | 30 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/lib/src/solid/api/rest_api.dart b/lib/src/solid/api/rest_api.dart index f70d6da2..a24b9d9c 100644 --- a/lib/src/solid/api/rest_api.dart +++ b/lib/src/solid/api/rest_api.dart @@ -342,6 +342,7 @@ Future checkResourceStatus( 'Authorization': 'DPoP $accessToken', 'Link': isFile ? fileTypeLink : dirTypeLink, 'DPoP': dPopToken, + ...noHttpCacheHeaders, }, ); @@ -372,6 +373,7 @@ Future checkWebIdExists(String webIdUrl) async { headers: { 'Content-Type': ResourceContentType.any.value, 'Link': fileTypeLink, + ...noHttpCacheHeaders, }, ); @@ -448,6 +450,7 @@ Future checkWebIdProfile(String webIdUrl) async { 'application/trig;q=0.75, ' 'text/n3;q=0.7, ' '*/*;q=0.1', + ...noHttpCacheHeaders, }, ); @@ -586,6 +589,7 @@ Future getResource(String resourceUrl) async { 'Authorization': 'DPoP $accessToken', 'Connection': 'keep-alive', 'DPoP': dPopToken, + ...noHttpCacheHeaders, }, ); @@ -614,6 +618,7 @@ Future<({List subDirs, List files})> getResourcesInContainer( 'Authorization': 'DPoP $accessToken', 'Connection': 'keep-alive', 'DPoP': dPopToken, + ...noHttpCacheHeaders, }, ); diff --git a/lib/src/solid/constants/common.dart b/lib/src/solid/constants/common.dart index 604e910d..c6920e5f 100644 --- a/lib/src/solid/constants/common.dart +++ b/lib/src/solid/constants/common.dart @@ -292,3 +292,33 @@ enum FileOpenMode { /// String value of the mode final String value; } + +/// Request headers that stop a GET being answered from a stale HTTP cache. +/// +/// Solid servers commonly mark responses cacheable for a long period — +/// Community Solid Server sends `Cache-Control: max-age=86400` (24 hours) with +/// `Vary: Accept,Authorization,Origin`. On the web, `package:http` is backed by +/// the browser's `fetch`, which honours that, so a container listing or +/// resource read is answered from the browser cache rather than the POD for a +/// full day. Reads then return whatever was true when the cache entry was +/// written: newly created resources are invisible and deleted ones linger. +/// +/// This is web-only in practice — `dart:io`'s `HttpClient`, used on every +/// native platform, implements no shared cache — which is why the symptom +/// appears only in Flutter web builds. +/// +/// `no-cache` rather than `no-store`: the response may still be stored, but it +/// must be revalidated with the origin before reuse. Where the server supplies +/// a validator, answered with `304 Not Modified` rather than a full +/// re-download. Community Solid Server advertises `ETag` support via +/// `Access-Control-Expose-Headers`, but does not send a validator on every +/// response (a container listing observed in testing carried neither `ETag` +/// nor `Last-Modified`), so some reads will be full re-fetches. That is the +/// intended trade: correctness over a saved round trip. +/// +/// `Pragma` is the HTTP/1.0 spelling, sent alongside for intermediaries that +/// predate `Cache-Control`. +const Map noHttpCacheHeaders = { + 'Cache-Control': 'no-cache', + 'Pragma': 'no-cache', +}; From 9fc0b0d11f8ff569c31a9b726b1ca628fb37d2a9 Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Tue, 8 Sep 2026 14:23:38 +1000 Subject: [PATCH 2/7] update changelog and bump minor version --- CHANGELOG.md | 1 + pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71b8ba16..2b5ee934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Visit the package at [pub.dev](https://pub.dev/packages/solidpod). ## 1.0 ++ Disable caching for web [1.0.21 20260908 jesscmoore] + Migrate oidc from 0->4 [1.0.20 20260904 gjw] + Update dependency (including rdf 1.0.0, renamed from rdflib) [1.0.19] + Support both user.server and server/user URIs [1.0.18 20260902 dc] diff --git a/pubspec.yaml b/pubspec.yaml index 40f6658e..36a23687 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: solidpod description: Support access to private data from PODs on Solid servers. -version: 1.0.20 +version: 1.0.21 homepage: https://github.com/anusii/solidpod environment: From 6cd1e21b1ef89be305448580294ca58a40d6f60f Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Tue, 8 Sep 2026 14:31:58 +1000 Subject: [PATCH 3/7] fix typos --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b5ee934..61027472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,8 +40,8 @@ Visit the package at [pub.dev](https://pub.dev/packages/solidpod). + Check missing resources [0.12.9 20260520 tonypioneer] + Support checking webID [0.12.8 20260520 tonypioneer] + Update Try Another WebID workflow [0.12.7 20260520 tonypioneer] -+ Bug fix to ttl rdf for special chars #628 [0.12.6 20260518 tonypioneer] -+ Upgrade solidauth and fix key file saving edge cases [0.12.5 20260427 jesscmoore] ++ Bug fix to ttl RDF for special chars #628 [0.12.6 20260518 tonypioneer] ++ Upgrade solid_auth and fix key file saving edge cases [0.12.5 20260427 jesscmoore] + Support user profile. [0.12.4 20260421 tonypioneer] + Key map + paths updates. Update file_picker. [0.12.3 20260420 jesscmoore] + Add silentLogout() [0.12.2 20260325 tonypioneer] From 6d27c9e1db8bbe3fea38bea9ff7d1b0c2aad2380 Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Wed, 9 Sep 2026 13:26:09 +1000 Subject: [PATCH 4/7] update example app sdk for ci workflow --- example/pubspec.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 04e5fbdf..0574cd3d 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,5 +1,5 @@ name: solidpodeg -description: "A new Flutter project." +description: 'A new Flutter project.' # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ^3.13.2 + sdk: '>=3.13.2 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -53,7 +53,6 @@ dev_dependencies: # The following section is specific to Flutter packages. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. From a621cf4d587bc019e0910118521efb395372b1f7 Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Wed, 9 Sep 2026 13:33:56 +1000 Subject: [PATCH 5/7] update example app sdk to 3.47.2 for ci workflow --- example/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0574cd3d..1dd8ca31 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.13.2 <4.0.0' + sdk: '>=3.47.2 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions From c6f670a4a302a3afdbe8fedcc99396f64ee41615 Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Wed, 9 Sep 2026 13:53:36 +1000 Subject: [PATCH 6/7] revised example sdk down to match dart 3.13.0 packaged with Flutter 3.47.0 specified in workflow --- example/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1dd8ca31..4b2c1582 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.47.2 <4.0.0' + sdk: '>=3.2.3 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions From d088e3f47e870270c821936202ed6d9cc309d0ab Mon Sep 17 00:00:00 2001 From: Jess Moore Date: Wed, 9 Sep 2026 14:46:35 +1000 Subject: [PATCH 7/7] set SDK to min 3.10.0 req for dot-shorthands and less than dart 3.13.0 in Flutter 3.47.0 --- example/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 4b2c1582..38c006c4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.2.3 <4.0.0' + sdk: '>=3.10.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions