📲
PWA Bundle
1.0.x
1.0.x
  • PHPWA Bundle
  • How To Create A PWA?
  • How To Install/Remove A PWA?
  • Bundle Installation
  • Deployment
  • The Manifest
    • Application Information
      • Scope
      • ID
      • Direction and Language
      • Orientation
      • Description
      • IARC Rating ID
      • Categories
    • Icons
    • Screenshots
    • Shortcuts
    • Protocol Handlers
    • File Handlers
    • Share Target
    • Complete Example
  • The Service Worker
    • Configuration
    • Content Security Policy
    • Custom Service Worker Rule
    • Workbox
      • Site Manifest Cache
      • Asset Caching
      • Resource Caching
      • Image Caching
      • Font Caching
      • Offline Fallbacks
      • BackgoundSync
      • CDN and Versions
      • Cache Cleaning
      • Custom Cache Strategy
    • Push Notifications
    • Complete Example
  • Symfony UX
    • Connection Status
    • Prefetch on demand
    • Sync Broadcast
    • BackgroundSync Form
  • Image Management
    • Icons
    • Screenshots
  • Experimental Features
    • Non-Standard Parameters
      • Launch Handler
      • Display Override
      • Related Applications
      • EDGE Side Panel
    • Translations
    • Widgets (Win10+)
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. The Manifest
  2. Application Information

Scope

The scope parameter in a Progressive Web App (PWA) manifest file is an important feature as it defines the set of URLs that the browser considers to be within your app. When a user navigates to a URL within the scope, they are kept within the full app experience.

/config/packages/pwa.yaml
pwa:
    manifest:
        enabled: true
        scope: "/"

Defining Scope:

  • The scope can be a relative path or an absolute URL.

  • If omitted, it defaults to the location of the manifest.

  • The start_url must be within the scope.

Best Practices:

  1. Keep the scope as restrictive as possible to maintain control over your app's user experience.

  2. Set the start_url to a URL within the app's scope so it starts in the right context.

  3. Test the scope to ensure it includes all the necessary pages and excludes any that should not be part of the PWA experience.

PreviousApplication InformationNextID

Last updated 1 year ago

Was this helpful?