MauiHybridWebView icon indicating copy to clipboard operation
MauiHybridWebView copied to clipboard

Enhancement Request: Support for Desktop Refresh without 404 Errors

Open HelloooJoe opened this issue 11 months ago • 1 comments

Description

When using the HybridWebView experiment in a .NET MAUI application on a desktop platform, refreshing the page leads to a 404 error. This issue affects the usability and the user experience, especially during development and testing phases.

Steps to Reproduce

  1. Run a .NET MAUI application that uses HybridWebView on a desktop platform.
  2. Navigate to any content within the HybridWebView that loads from a local or proxied resource.
  3. Refresh the page.
  4. The application shows a 404 error page instead of reloading the current content.

Expected Behavior

The application should reload the current page/content within the HybridWebView without any errors, preserving the user's state and context where applicable.

Actual Behavior

The application fails to find the requested page after a refresh and displays a 404 error, indicating that the resource cannot be found.

Possible Solutions or Suggestions

  • Implement a mechanism to handle refresh actions within the HybridWebView control, potentially by caching the last loaded URL or state and attempting to reload it upon a refresh action.
  • Investigate if the issue is related to the way routing is handled within the .NET MAUI application or the underlying web view control and propose a solution to maintain routing context across refreshes.

Question

Is handling refresh actions on the desktop within the scope of the HybridWebView control, or should it be managed at the application level? Any guidance on best practices or recommendations would be greatly appreciated.

Environment

  • .NET MAUI version: [8.0.10]
  • Platform Target Frameworks:
    • Desktop: [Windows/MacOS version]
  • Relevant plugins or packages: EJL.MauiHybridWebView [1.0.0-preview6]

Additional Context

Add any other context or screenshots about the enhancement request here.

image

HelloooJoe avatar Mar 27 '24 19:03 HelloooJoe