Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Download the page built on EDS

Avatar

Level 3

I see loads of advantages of going for EDS , especially in case of SPA. But, if there is a need to download/make the page accessible when offline, I notice css is getting applied, but JS errors are encountered. Export issues and cors issues are present. Appreciate any suggestions / alternate approaches for this.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 5

Hi @Sahana_S 

When you save a page for offline access, it attempts to save all necessary resources like HTML, CSS, and JavaScript files to function properly offline. EDS relies heavily on JavaScript for rendering content. Without an internet connection, downloaded JS files might not execute properly, leading to broken functionality.

EDS typically serves content dynamically based on user interaction, and crucial assets like JavaScript libraries or configuration files might not be included in the initial page download and If your EDS content is served from a different domain (origin) than your SPA, CORS (Cross-Origin Resource Sharing) restrictions might prevent the browser from downloading assets from the EDS domain.

Approach:
my approach would be to pre-render critical pages on the server-side using SSR (Server-side Rendering) or SSG (Static Site Generation) tools like Gatsby or Next.js. This generates static HTML files that can be downloaded and function offline.

Use EDS for dynamic content updates and retrieval via APIs.