Browser Virtual Path Rewriting for Refresh-Safe Portal Navigation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional URL rewriting in portal systems consumes server-side resources, causes page flickering, and HTML5 history objects fail to manage partial page content refreshes, leading to HTTP 404 errors when refreshing virtual paths.
Innovation Solution
A method and system that uses HTML5 History objects to rewrite browser paths virtually, enabling asynchronous requests through XMLHTTP, partial page refreshes, and customizes site paths without actual URLs, with a computer device and storage medium to execute these steps.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional URL rewriting is used, then security is improved and user memory of site address is facilitated, but server-side resources and broadband resources are consumed more
Solution Approach 1:
The patent introduces a path rewriting module as an intermediary component that sits between the user and the actual system resources. This module translates user-friendly virtual paths into actual system paths without requiring full server-side processing, thereby maintaining security while reducing server resource consumption. The intermediary handles path translation efficiently without triggering complete page postbacks.
Solution Approach 2:
The patent creates virtual copies of path structures that mirror the actual system hierarchy. Instead of directly accessing real URLs, the system uses copied virtual path representations that can be manipulated and rewritten without affecting actual resource locations. This copying mechanism allows path rewriting to occur with minimal server resource involvement.
2Ease of operation
If traditional URL rewriting with page postback is used, then URL rewriting is achieved, but pages flicker and user experience deteriorates
Solution Approach 1:
The patent segments the page update process into partial refreshes rather than complete postbacks. Specific components of the page can be updated independently without requiring the entire page to reload, which eliminates the flickering effect while maintaining the ability to rewrite URLs. This segmentation allows for smoother transitions and better user experience.
Solution Approach 2:
Instead of performing full page postbacks, the patent applies partial actions by updating only the necessary portions of the page. This partial refresh approach achieves URL rewriting without the visual disruption of complete page reloads, thereby reducing flickering and improving user experience.
3Extent of automation
If HTML5 history API is used to update browser URL, then browser side URL is updated, but server request is not sent and page content changes cannot be addressed
Solution Approach 1:
The patent performs preliminary actions by pre-configuring the path rewriting module to handle both URL updates and corresponding content refreshes. When the history API updates the browser URL, the preliminary setup ensures that the server is already prepared to respond with appropriate content, eliminating the gap between URL update and content refresh.
Solution Approach 2:
The patent implements feedback mechanisms that monitor browser history changes and trigger appropriate server requests. When the history API modifies the URL, the feedback loop detects this change and automatically initiates the necessary server communication and page content updates, ensuring synchronization between URL and content.
4Ease of operation
If location.reload() or history.go(0) is used to refresh page, then page refresh is achieved, but HTTP 404 error occurs for virtual paths
Solution Approach 1:
The path rewriting module acts as an intermediary that intercepts refresh requests before they reach the server. When location.reload() or history.go(0) is called, the intermediary captures the virtual path, translates it to the actual path, and processes the request appropriately, preventing 404 errors while maintaining virtual path functionality.
Solution Approach 2:
The system performs preliminary path translation and validation before the actual refresh request is processed. By pre-processing virtual paths and preparing the appropriate responses in advance, the system ensures that refresh operations succeed without generating 404 errors, even for dynamically generated virtual paths.
Data Source
AI summary
The invention provides a browser side virtual path rewriting method, system and computer device, including: the system generates first level sites of a portal based on user role permissions, and loads all site pages and sub sites within the permissions according to the first site ID of the first level sites; when the browser renders the generated page, run the script file instructions to replace the original access address of the browser with the main path to be rewritten. After the user clicks a site, the script instruction calculates the path from the site to the first level site, and forms a sub site path by all site names and the separators between sites on the path; Call the history object, run the script command, and replace the original access address of the browser with the main path/site path to be rewritten. The invention solves the problem that traditional URL rewriting consumes more server-side resources and broadband resources, which makes it difficult for users to obtain a better experience, and also solves the problem that virtual path rewriting of HTML5 history objects cannot be refreshed.

