> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/print-partnerships/llms.txt > Use this file to discover all available pages before exploring further. # Handle page refreshes If the user is editing a design and refreshes the page that hosts the integration's iframe, the default behavior forces them to navigate back to their design. This means they can't bookmark and easily return to their design. This guide explains how to use URL query parameters to re-open the user's design when they refresh the page. **Tip:** There are other techniques for handling page refreshes, such as using local storage or even backend persistence. ## Step 1: When the user opens a design, create a `designId` query parameter The following snippet demonstrates how to detect when a user opens a design with the [`onDesignOpen`](https://www.canva.dev/docs/print-partnerships/javascript-api/on-design-open/) method and set the `designId` of the design as a query parameter: ```javascript (async () => { const api = await Canva.Partnership.initialize({ apiKey: "", autoAuthToken: "", container: document.getElementById("container"), }); const onDesignOpen = (opts) => { history.replaceState( null, document.title, window.location.href + "?designId=" + opts.designId ); }; const onProductSelect = (opts) => { api.createDesign({ ...opts, onDesignOpen, }); }; api.showCatalog({ onProductSelect, }); })(); ``` ## Step 2: If the `designId` query parameter exists, open the design with the `editDesign` method The following snippet checks if the `designId` query parameter exists, and if it does, opens the design with the [`editDesign`](https://www.canva.dev/docs/print-partnerships/javascript-api/edit-design/) method: ```javascript if (queryString.get("designId")) { api.editDesign({ designId: queryString.get("designId"), }); return; } ``` If the `designId` query parameter does not exist, a new design is created. ## Example ```html Print Partnership Example
```