|
| 1 | +# Favicon Implementation Guide |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The GenAI IDP accelerator includes a comprehensive favicon implementation that provides professional branding across all browsers and devices. This document explains the favicon setup and how it works. |
| 6 | + |
| 7 | +## Favicon Design |
| 8 | + |
| 9 | +The favicon features a **blue background with a white "D"** representing "Document" processing, which aligns with the GenAI Intelligent Document Processing purpose. |
| 10 | + |
| 11 | +### Design Specifications |
| 12 | +- **Primary Color**: Blue (#0066cc) |
| 13 | +- **Text Color**: White (#ffffff) |
| 14 | +- **Symbol**: "D" for Document |
| 15 | +- **Style**: High contrast for visibility across all browsers |
| 16 | + |
| 17 | +## Files Included |
| 18 | + |
| 19 | +The favicon implementation includes multiple formats for maximum compatibility: |
| 20 | + |
| 21 | +### Core Favicon Files |
| 22 | +- `favicon.ico` - Main favicon in ICO format (16x16 and 32x32 pixels) |
| 23 | +- `favicon-16x16.png` - 16x16 PNG version |
| 24 | +- `favicon-32x32.png` - 32x32 PNG version |
| 25 | + |
| 26 | +### Mobile and PWA Support |
| 27 | +- `apple-touch-icon.png` - 180x180 Apple Touch Icon for iOS devices |
| 28 | +- `logo192.png` - 192x192 PNG for PWA installations |
| 29 | +- `logo512.png` - 512x512 PNG for PWA installations |
| 30 | + |
| 31 | +### Browser Configuration |
| 32 | +- `browserconfig.xml` - Configuration for Internet Explorer and Edge |
| 33 | + |
| 34 | +### HTML Integration |
| 35 | +- `index.html` - Updated with comprehensive favicon links |
| 36 | + |
| 37 | +## HTML Implementation |
| 38 | + |
| 39 | +The `index.html` file includes comprehensive favicon links: |
| 40 | + |
| 41 | +```html |
| 42 | +<!-- Comprehensive favicon setup for all browsers --> |
| 43 | +<link rel="icon" type="image/x-icon" href="%PUBLIC_URL%/favicon.ico?v=4" /> |
| 44 | +<link rel="shortcut icon" type="image/x-icon" href="%PUBLIC_URL%/favicon.ico?v=4" /> |
| 45 | +<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png?v=4" /> |
| 46 | +<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png?v=4" /> |
| 47 | +<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/logo192.png?v=4" /> |
| 48 | +<link rel="icon" type="image/png" sizes="512x512" href="%PUBLIC_URL%/logo512.png?v=4" /> |
| 49 | +<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon.png?v=4" /> |
| 50 | +<meta name="theme-color" content="#0066cc" /> |
| 51 | +<meta name="msapplication-TileColor" content="#0066cc" /> |
| 52 | +<meta name="msapplication-config" content="%PUBLIC_URL%/browserconfig.xml" /> |
| 53 | +``` |
| 54 | + |
| 55 | +## Browser Compatibility |
| 56 | + |
| 57 | +The favicon implementation supports: |
| 58 | + |
| 59 | +- ✅ **Chrome/Chromium** - All versions |
| 60 | +- ✅ **Firefox** - All versions |
| 61 | +- ✅ **Safari** - Desktop and mobile |
| 62 | +- ✅ **Edge** - All versions |
| 63 | +- ✅ **Internet Explorer** - Legacy support |
| 64 | +- ✅ **Mobile browsers** - iOS, Android |
| 65 | +- ✅ **PWA installations** - Progressive Web Apps |
| 66 | + |
| 67 | +## Cache Busting |
| 68 | + |
| 69 | +The implementation includes version parameters (`?v=4`) to ensure browsers load the latest favicon when updates are made. |
| 70 | + |
| 71 | +## Deployment |
| 72 | + |
| 73 | +### Automatic Deployment |
| 74 | +When you deploy the GenAI IDP accelerator using the standard CloudFormation template, the favicon files are automatically included in the WebUI build process. |
| 75 | + |
| 76 | +### Manual Updates |
| 77 | +If you need to update the favicon on existing deployments: |
| 78 | + |
| 79 | +1. The favicon files are automatically copied during the CodeBuild process |
| 80 | +2. CloudFront cache is invalidated to show changes immediately |
| 81 | +3. No manual intervention required for new deployments |
| 82 | + |
| 83 | +## Customization |
| 84 | + |
| 85 | +### Changing the Favicon |
| 86 | +To customize the favicon for your organization: |
| 87 | + |
| 88 | +1. **Replace the favicon files** in `src/ui/public/` with your custom designs |
| 89 | +2. **Maintain the same file names** and formats |
| 90 | +3. **Update the version parameter** in `index.html` (e.g., `?v=5`) |
| 91 | +4. **Redeploy** the stack to apply changes |
| 92 | + |
| 93 | +### Recommended Tools |
| 94 | +- **ImageMagick** - For converting between formats |
| 95 | +- **GIMP/Photoshop** - For creating custom designs |
| 96 | +- **Online favicon generators** - For quick conversions |
| 97 | + |
| 98 | +### File Size Guidelines |
| 99 | +- Keep favicon files small (< 50KB each) |
| 100 | +- Use appropriate compression |
| 101 | +- Test across different browsers |
| 102 | + |
| 103 | +## Technical Details |
| 104 | + |
| 105 | +### Build Process Integration |
| 106 | +The favicon files are located in `src/ui/public/` and are automatically: |
| 107 | +1. Copied to the build output by React's build process |
| 108 | +2. Uploaded to the S3 WebUI bucket by CodeBuild |
| 109 | +3. Served through CloudFront with proper caching headers |
| 110 | + |
| 111 | +### Content Types |
| 112 | +The files are served with appropriate MIME types: |
| 113 | +- `.ico` files: `image/x-icon` |
| 114 | +- `.png` files: `image/png` |
| 115 | +- `.xml` files: `application/xml` |
| 116 | + |
| 117 | +## Troubleshooting |
| 118 | + |
| 119 | +### Favicon Not Showing |
| 120 | +If the favicon doesn't appear: |
| 121 | + |
| 122 | +1. **Hard refresh** the browser (Ctrl+F5 or Cmd+Shift+R) |
| 123 | +2. **Clear browser cache** completely |
| 124 | +3. **Try incognito/private mode** |
| 125 | +4. **Check CloudFront cache** - may take 1-3 minutes to propagate |
| 126 | +5. **Verify file accessibility** - test direct URL to favicon.ico |
| 127 | + |
| 128 | +### Browser-Specific Issues |
| 129 | +- **Chrome**: May cache aggressively - use incognito mode for testing |
| 130 | +- **Firefox**: Clear cache through Settings → Privacy & Security |
| 131 | +- **Safari**: Use Develop menu → Empty Caches |
| 132 | +- **Mobile**: May require app restart or cache clear |
| 133 | + |
| 134 | +## Future Enhancements |
| 135 | + |
| 136 | +Potential improvements for future versions: |
| 137 | +- **SVG favicon support** for vector graphics |
| 138 | +- **Dark mode variants** for different themes |
| 139 | +- **Animated favicons** for status indicators |
| 140 | +- **Organization-specific branding** options |
| 141 | + |
| 142 | +## Support |
| 143 | + |
| 144 | +For issues related to favicon implementation: |
| 145 | +1. Check browser developer tools for 404 errors |
| 146 | +2. Verify CloudFront distribution is serving files correctly |
| 147 | +3. Test with multiple browsers and devices |
| 148 | +4. Review CloudFormation stack outputs for correct URLs |
| 149 | + |
| 150 | +--- |
| 151 | + |
| 152 | +This favicon implementation ensures professional, consistent branding across all GenAI IDP deployments and provides an excellent user experience across all browsers and devices. |
0 commit comments