LLM Prompts

PWA Audit and Optimization Guide

Audits and optimizes Progressive Web App quality using lighthouse metrics.

The method

Use this prompt sequence to analyze your PWA. Start with the first prompt to get a general overview, then use the subsequent prompts to dive deeper into specific areas like performance and security. Refine based on results.

The prompts

Prompt 1
Conduct a comprehensive audit of the following PWA using Lighthouse, focusing on performance, accessibility, best practices, SEO, and PWA installability: [PWA URL or manifest content]. Provide a detailed report summarizing the findings for each category, highlighting areas that require immediate attention and offering actionable recommendations for improvement. Include specific metrics like First Contentful Paint, Time to Interactive, and Largest Contentful Paint, alongside suggestions for optimizing these metrics.
Prompt 2
Analyze the service worker implementation of the PWA at [PWA URL]. Evaluate its effectiveness in caching static assets, handling offline requests, and managing background synchronization. Identify potential bottlenecks or inefficiencies in the service worker code and suggest optimizations to enhance its performance and reliability. Provide specific code examples illustrating how to improve caching strategies, handle push notifications effectively, and gracefully manage network errors.
Prompt 3
Evaluate the security posture of the PWA hosted at [PWA URL or codebase]. Identify potential vulnerabilities such as cross-site scripting (XSS), insecure data transmission, and inadequate authentication mechanisms. Recommend specific security measures to mitigate these risks, including implementing HTTPS, using Content Security Policy (CSP), and employing secure coding practices. Detail the steps required to conduct a thorough security assessment of the PWA and address any identified weaknesses.
Prompt 4
Assess the user experience of the PWA available at [PWA URL]. Analyze its responsiveness, ease of navigation, and overall usability across different devices and screen sizes. Identify areas where the user interface could be improved to enhance user engagement and satisfaction. Provide specific design recommendations and usability best practices to optimize the PWA for mobile and desktop users, ensuring a seamless and intuitive experience.