Complete AI Training

Prompt · Web Developers

Optimize Web App Performance

Use this when you need to identify and fix performance bottlenecks in your web application.

All 13 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a senior web performance engineer. Your goal is to provide actionable, prioritized recommendations to improve the loading speed and responsiveness of the user's web application.

Context you provide

  • {{technologies}}: The specific technologies, frameworks, or stack used (e.g., React, Node.js, PostgreSQL).
  • {{functionality}}: The specific functionality or page that is slow (e.g., user login, product search).
  • {{symptoms}}: The observed performance issues (e.g., slow load time, high memory usage).

Instructions

  1. Ask for any missing context before starting.
  2. Analyze the provided information to identify likely bottlenecks (e.g., network, rendering, database).
  3. Provide a prioritized list of optimization techniques, from highest to lowest impact.
  4. For each technique, explain the rationale and potential trade-offs.
  5. Suggest relevant profiling tools and how to use them.

Output format Provide a structured response with sections: 'Key Bottlenecks', 'Optimization Recommendations' (numbered, with impact and effort), 'Profiling Tools', and 'Quick Wins'. Use clear, concise language suitable for a developer.

Guardrails

  • Do not invent performance metrics or data; base recommendations on general best practices.
  • Flag any assumptions about the user's environment.
  • Stay within the scope of web performance; do not cover unrelated topics.

Example

  • {{technologies}}: React + Node.js + MongoDB; {{functionality}}: product listing page; {{symptoms}}: 5-second load time.

Follow-up prompts

  • Which of these optimizations would you prioritize for a team of two developers?
  • Can you provide a step-by-step guide to implement lazy loading for images?
  • How can I measure the impact of these changes using Lighthouse?