dotCMS / dotCMS/core

UVE: Avoid Changing iframe URL in Headless Mode for Faster Content Updates

Open
#31,139 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Core Features Priority : 3 Average Team : Scout Type : Task
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Parent Issue

#30943

Background

Currently, in headless mode, every time the client sends a new URL, the UVE reloads the iframe. However, modern frameworks, using our hooks, are capable of handling content updates efficiently without the need for a full iframe reload. This results in an unnecessary double reload, slowing down the process and reducing performance.

Overview

When operating in headless mode, we should avoid modifying the iframe URL upon receiving a new URL from the client. Instead, the framework will handle content updates internally, and the UVE should rely on postMessage to fetch and update the data. This approach will eliminate redundant reloads, ensuring a faster and smoother user experience.

Video

https://github.com/user-attachments/assets/fff6d55c-c79b-4eed-82e0-4628529e8172

Task
  1. Prevent iframe URL Mutation: Ensure the iframe URL remains unchanged when in headless mode.
  2. Implement Data Fetching via postMessage: Update the data dynamically through postMessage without reloading the iframe.
  3. Optimize Framework Communication: Ensure the framework efficiently manages content updates without requiring a full iframe reload.
  4. Document Changes: Clearly document this behavior in the UVE documentation to inform developers of the new optimization.
Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

Acceptance Criteria

```[tasklist]

Acceptance Criteria
  • The iframe URL remains static in headless mode.
  • Data updates occur through postMessage without triggering a full iframe reload.
  • Performance improvements are observed by avoiding double reloads.
  • Documentation is updated to reflect these changes and guide developers.
    \`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the UVE headless-mode handling for iframe URL updates and the existing postMessage communication entry points. Trace how a new client URL currently triggers reloads, then verify that the iframe remains static, updates arrive through postMessage, and the UVE documentation describes the behavior. No specific files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.