Consider excluding Search component from Angular SSR (Server Side Rendering) #3231
Labels
affects: 7.x
Issue impacts 7.x releases
affects: 8.x
Issue impacts 8.x releases
bug
component: Discovery
related to discovery search or browse system
high priority
performance / caching
Related to performance, caching or embedded objects
Describe the bug
This is a subtopic to #3110.
As part of those performance discussions, 4Science mentioned they've found (in DSpace-CRIS) that SSR performance is improved when the Search Component (
search.component.ts
) is excluded from Server Side Rendering. This would mean that searching will only function for Client Side Rendering (CSR).See the code change in https://github.com/4Science/dspace-angular/blob/main-cris/src/app/shared/search/search.component.ts#L415-L419
This should have no impact on SEO because well-behaving crawlers all use Sitemaps, and we already exclude
/search
and search filters in our robots.txt: https://github.com/DSpace/dspace-angular/blob/main/src/robots.txt.ejs#L11Further testing may need to be done to ensure disabling searching in SSR doesn't have side effects for accessibility (e.g. screen readers). But, my understanding is that it should not, as these tools should all trigger CSR. This is something we can test further once a PR is created and/or offer a configuration to turn this on/off.
Assigning @atarix83 to create a PR.
Related work
Related to #3110 because it should provide benefits to SSR performance.
The text was updated successfully, but these errors were encountered: