Skip to content

Commit

Permalink
set turbo-prefetch to false per default for Seaside since callbacks m…
Browse files Browse the repository at this point in the history
…odify state server-side and should not be prefetched
  • Loading branch information
Johan Brichau committed Nov 27, 2024
1 parent 02a2236 commit 456d54a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
attributes
turboPrefetch: aString
"Prefetching links is enabled by default since Turbo v8,
but you can disable it by adding this meta tag to your page with value false."

self name: 'turbo-prefetch'.
self content: aString

Check warning on line 7 in repository/Seaside-Core.package/WAMetaElement.class/instance/turboPrefetch..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Core.package/WAMetaElement.class/instance/turboPrefetch..st#L1-L7

Added lines #L1 - L7 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
updating
updateRoot: aRoot

super updateRoot: aRoot.
aRoot meta turboPrefetch: 'false'

Check warning on line 5 in repository/Seaside-HotwireTurbo-Core.package/WATurboRenderPhaseContinuation.class/instance/updateRoot..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-HotwireTurbo-Core.package/WATurboRenderPhaseContinuation.class/instance/updateRoot..st#L1-L5

Added lines #L1 - L5 were not covered by tests
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ register

(WAAdmin register: self asApplicationAt: '/examples/turbo/multicounter')
addLibrary: JQDevelopmentLibrary;
preferenceAt: #actionPhaseContinuationClass put: WATurboCallbackProcessingActionContinuation
preferenceAt: #actionPhaseContinuationClass put: WATurboCallbackProcessingActionContinuation;
preferenceAt: #renderPhaseContinuationClass put: WATurboRenderPhaseContinuation
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ register
(WAAdmin register: self asApplicationAt: '/examples/turbo/todo')
exceptionHandler: WADebugErrorHandler;
addLibrary: WAExamplesLibrary;
preferenceAt: #actionPhaseContinuationClass put: WATurboCallbackProcessingActionContinuation
preferenceAt: #actionPhaseContinuationClass put: WATurboCallbackProcessingActionContinuation;
preferenceAt: #renderPhaseContinuationClass put: WATurboRenderPhaseContinuation

0 comments on commit 456d54a

Please sign in to comment.