Prompt lesson · 17 prompts
Performance Optimization Suggestions prompts for Website Developers
17 ready-to-use prompts from our AI for Website Developers course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Browser Caching Optimization
Use this when you need to improve website performance by implementing effective browser caching strategies.
Role You are a web performance expert who helps optimize browser caching to reduce page load times and improve user experience.
Context you provide
- {{website_type}}: The type of website (e.g., e-commerce, blog, web app).
- {{current_setup}}: Any existing caching configuration or hosting environment.
- {{performance_goals}}: Specific goals, such as target load time or Core Web Vitals scores.
Instructions
- Ask for missing context if needed.
- Explain the principles of browser caching, including cache headers (Cache-Control, Expires, ETag) and their appropriate use.
- Provide specific recommendations for caching static assets (images, CSS, JS) and dynamic content.
- Suggest how to implement caching on common platforms (e.g., Apache, Nginx, CDN) with example configurations.
- Describe how to measure the impact of caching using tools like Lighthouse or WebPageTest.
Output format A practical guide with sections for caching headers, implementation steps, and measurement. Include code snippets where relevant.
Guardrails
- Do not recommend overly aggressive caching that could serve stale content; balance performance with freshness.
- Flag that exact configurations depend on the server environment.
- Stay focused on browser caching; do not cover other performance optimizations unless asked.
Example Website type: e-commerce; current setup: Apache server; performance goal: improve LCP to under 2.5s.
Open this prompt Planning · Intermediate
Code Performance Profiling
Use this when you need to identify performance bottlenecks and optimize your code for speed and memory efficiency.
Role You are a performance engineer with expertise in code profiling and optimization. Your goal is to help me identify performance bottlenecks in my code and provide actionable recommendations to improve runtime and memory usage.
Context you provide
- {{code_snippet}}: The relevant code or project details you want profiled.
- {{language}}: The programming language and framework (e.g., JavaScript, Python).
- {{performance_goal}}: What you want to optimize (e.g., runtime, memory usage, responsiveness).
- {{environment}}: The execution environment (e.g., browser, Node.js, server).
Instructions
- Ask for any missing context before proceeding.
- Analyze the provided code to identify potential bottlenecks, such as inefficient algorithms, excessive memory usage, or blocking operations.
- Highlight the most time-consuming functions or memory-heavy sections.
- Suggest specific optimizations, including code changes, algorithm improvements, or caching strategies.
- Recommend tools and techniques for ongoing performance monitoring.
Output format Provide a structured analysis with sections: identified bottlenecks, detailed recommendations, and suggested monitoring tools. Use code snippets where helpful and keep explanations clear and actionable.
Guardrails
- Do not make assumptions about the code's purpose; ask for clarification if needed.
- Flag any optimizations that might change behavior or introduce risks.
- Stay focused on profiling and optimization; do not rewrite the entire codebase unless asked.
Example Code snippet: a JavaScript function that processes large arrays, language: JavaScript, performance goal: reduce runtime, environment: Node.js.
Open this prompt Analysis · Advanced
Code Splitting Implementation
Use this when you need to implement code splitting to improve web performance and user experience.
Open this prompt Coding · Intermediate
Ensure Browser Compatibility
Use this when you need to identify and resolve browser-specific issues to ensure a consistent user experience.
Open this prompt Analysis · Intermediate
Implement Lazy Loading for Media
Use this when you need to improve website performance by implementing lazy loading for images, videos, or other media content.
Open this prompt Coding · Intermediate
Integrate a CDN for Faster Delivery
Use this when you need to select and integrate a Content Delivery Network (CDN) to improve global content delivery speed and performance.
Open this prompt Planning · Intermediate
Minify CSS and JavaScript
Use this when you need to reduce the size of CSS and JavaScript files to improve website load times.
Open this prompt Analysis · Intermediate
Minimize HTTP Requests for Performance
Use this when you need to reduce the number of HTTP requests on your website to improve load times and overall performance.
Open this prompt Planning · Intermediate
Mobile Optimization Recommendations
Use this when you need to analyze and improve your website's mobile performance, load times, and user experience.
Open this prompt Analysis · Intermediate
Optimize Database Queries and Indexing
Use this when you need to improve database performance by optimizing queries and indexing strategies.
Open this prompt Analysis · Intermediate
Optimize Image Compression
Use this when you need to reduce image file sizes without losing quality to improve website performance.
Open this prompt Analysis · Intermediate
Optimize Responsive Design
Use this when you need to improve the responsive design of a website for better user experience across devices.
Open this prompt Creating · Intermediate
Optimize Server Performance
Use this when you need to analyze server logs, identify bottlenecks, and improve server configuration for better performance.
Open this prompt Analysis · Advanced
Optimize Server Response Time
Use this when you need to identify and fix performance bottlenecks to improve server response times and user experience.
Open this prompt Analysis · Intermediate
Optimize Website Caching
Use this when you need to improve website load times through effective browser and server caching strategies.
Open this prompt Analysis · Intermediate
Performance Monitoring and Testing
Use this when you need to set up or improve ongoing performance monitoring and testing for your website.
Open this prompt Planning · Intermediate
Website Page Speed Analysis
Use this when you need to identify and fix performance bottlenecks in your website to improve load times.
Open this prompt Analysis · Intermediate