Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Enhance SSR hints/tips

...

In DSpace 7, server-side rendering is enabled by default (when running in production mode). However, it's important to ensure you do not disable it in production mode.  Per the frontend Installation instructions, you MUST also be running your user interface in production mode (via either yarn run serve:ssr or yarn start).

Because the DSpace user interface is based on Angular.io (which is a javascript framework), you MUST have server-side rendering enabled (which is the default) for search engines to fully index your side.  Server-side rendering allows your site to still function even when Javascript is turned off  in a user's browser.  Some web crawlers do not support Javascript (e.g. Google Scholar), so they will only interact with this server-side rendered content.DSpace use Angular Universal for

If you are unsure if server-side rendering , and it's enabled by default in Production mode via this configuration in src/environments/environment.production.ts:

Code Block
// Angular Universal Settings
universal: {
  preboot: true,
  ...
},

Per the frontend Installation instructions, you must also be running your production frontend/UI via either yarn run serve:ssr or yarn start.

For information, see "Universal (Server-side Rendering) settings" in User Interface Configuration

(SSR) is enabled, you can check to see if your site is accessible when Javascript is turned off.  For example, in Chrome, you should be able to do the following:

  1. Open your site in the Chrome browser
  2. Turn off (disable) Javascript using the Chrome instructions: https://developer.chrome.com/docs/devtools/javascript/disable/
  3. Click reload in your browser window to reload your site.
    1. If SSR is enabled, then you will still see your site's contents. You should be able to browse & search the site. (Keep in mind, pages may take longer to load because every request requires SSR.)  However, all dynamic menus or actions obviously will not work, as all pages will be static HTML.
    2. If SSR is disabled, then you will see a blank white page. You will not be able to see any content on your site.
  4. Don't forget to re-enable Javascript after you are done testing (see link above, or just close that window & reopen a new one)

DSpace use Angular Universal for server-side rendering, and it's enabled by default in Production mode via our production environment initialization in src/environments/environment.production.ts:

Code Block
// Angular Universal Settings
universal: {
  preboot: true,
  ...
},

For information, see "Universal (Server-side Rendering) settings" in User Interface ConfigurationYou can test whether server-side rendering is enabled by temporarily disabling JavaScript in your browser (usually this is in the settings of the Developer Tools) and attempting to access your DSpace site.   All basic browse/search functionality should work with JavaScript disabled. (However, all dynamic menus or actions obviously will not work, as all pages will be static HTML.)

Ensure the sitemaps feature is enabled

...