Lesson 6 of 16 · 40 min suggested practice

Make downloads real and save favourites in the browser

Connect actual resource files, handle missing files honestly, and add local favourites without requiring an account.

By Ashley Kays · Reviewed November 19, 2026 · Independent learning guide

The answer: A working download must point to a real file or a real delivery route. Browser-local favourites can make a small resource library useful without accounts, but they remain tied to that browser and can be cleared. Do not describe local storage as shared or cross-device persistence.

Create a file manifest before wiring buttons

List each resource ID, actual filename, file format, and public delivery URL. Use files you created or have permission to distribute. Make the displayed title and format match the file. If the tutorial package does not contain an individual resource yet, show an unavailable state or link to the real starter bundle with an accurate label.

A button that displays a toast is not proof of delivery. Open the final URL and inspect the received file. Check that it is the intended document rather than an HTML error page saved with a misleading extension.

Choose understandable download behavior

Use descriptive link text such as 'Download the kickoff checklist' with the file type nearby. A browser may open a document instead of saving it immediately; explain the result in terms of access to the file, not a promise about every browser's download dialog.

Handle a missing URL explicitly. Disable the action with a useful explanation or replace it with a clear availability message. Do not send a visitor to a placeholder path. Keep the readme and usage instructions accessible so a downloaded resource has context when separated from the website.

Add local favourites with a clear boundary

Store only stable resource IDs in a versioned browser-storage key, then resolve those IDs against the current dataset. A saved-list page should show the matching records and let users remove them. Explain that the list is saved in this browser and does not create an account.

Handle unavailable storage gracefully. Private browsing settings, blocked storage, or clearing site data can affect persistence. If storage fails, the session should still work without pretending that the preference will survive a reload. Do not store secrets or sensitive personal content in this feature.

Test delivery and persistence separately

Save two resources, refresh, reopen the list, remove one, and refresh again. Try a record removed from the dataset so stale IDs do not crash the list. Then test every real download from both its detail page and the library if both expose it.

If a save button changes visually but the choice disappears, inspect the storage write and load behavior. If a file opens incorrectly, inspect the actual response and manifest. These are different problems and should be fixed independently before you add analytics or sign-in.

Try this focused prompt.

Add browser-local favourites to Resource Shelf using stable resource IDs and a versioned storage key. Label the feature 'Saved in this browser' and handle blocked storage without crashing. Build an empty saved-list state and ignore stale IDs safely. Wire downloads only to the real URLs in the supplied file manifest; missing URLs must show an honest unavailable state. Verify save, refresh, remove, refresh, stale IDs, and each real file link.

Replace the sample context with your own approved facts. Review Lovable’s proposed changes before accepting them.

Evidence before the next step

Check your work.

  • Each enabled file action reaches the intended real resource.
  • Favourites survive refresh in the same browser when storage is available.
  • The interface clearly explains local-only persistence and unavailable files.

Your checkmark stays in this browser. It records your own progress, not a certification.

Official sources & further reading

Reviewed November 19, 2026. Plans, terminology and interfaces can change; follow the linked documentation if your workspace differs.