A browser extension that resolves Edge Side Include (ESI) tags locally for development and testing purposes. Built with AI assistance.
- 🔄 ESI Tag Resolution: Automatically resolves
<esi:include>
tags and ESI comments - 🎛️ Toggle Control: Easy on/off switch with visual icon indicators
- 📊 Statistics Tracking: Monitor successful/failed ESI requests with detailed stats
- 🔗 Jump Navigation: Click to jump directly to any ESI fragment on the page
- 🛠️ Custom Headers: Add custom HTTP headers to ESI fragment requests
- 🌐 URL Resolution: Smart resolution of relative URLs against page base URL
⚠️ Error Handling: Clear error messages for failed ESI requests- 🎯 Try/Except Support: Handles complex ESI try/attempt/except structures
-
Clone the repository:
git clone https://github.com/jkoebner/vibe-esi-resolver-jsesi-resolver.git cd esi-resolver
-
Load in Firefox:
- Open Firefox and navigate to
about:debugging
- Click "This Firefox"
- Click "Load Temporary Add-on"
- Select
manifest.json
- Open Firefox and navigate to
-
Load in Chrome:
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the extension folder
- Open Chrome and navigate to
- Download the latest release from the Releases page
- For Firefox: Drag the
.xpi
file into Firefox or install viaabout:addons
- For Chrome: Install the
.crx
file viachrome://extensions/
- Enable/Disable: Click the extension icon and toggle the ON/OFF switch
- View Statistics: See real-time stats of processed ESI fragments
- Add Custom Headers: Add any custom HTTP headers needed for your ESI requests
- Jump to Fragments: Click on fragment URLs in the popup to scroll to them on the page
- Clear Statistics: Reset all statistics for the current page
- 🟢 Green Icon: ESI processing is enabled
- 🔴 Red Icon: ESI processing is disabled
The extension handles various ESI tag formats:
<!-- Standard ESI include -->
<esi:include src="/path/to/fragment.html" />
<!-- ESI try/attempt/except blocks -->
<esi:try>
<esi:attempt>
<esi:include src="/path/to/fragment.html" />
</esi:attempt>
<esi:except>
Fallback content
</esi:except>
</esi:try>
<!-- ESI in comments (common in some implementations) -->
<!-- <esi:include src="/path/to/fragment.html" /> -->
esi-resolver/
├── manifest.json # Extension manifest
├── popup.html # Extension popup UI
├── popup.js # Popup logic and UI handling
├── content.js # Main ESI processing logic
├── background.js # Background script and icon management
├── icon*-on.png # Enabled state icons
├── icon*-off.png # Disabled state icons
├── README.md # This file
├── LICENSE # GPL-3.0 license
└── .gitignore # Git ignore rules
To package the extension:
# For Firefox
zip -r esi-resolver.zip manifest.json popup.html js/popup.js js/content.js js/background.js css/style.css icons/*.png
mv esi-resolver.zip esi-resolver.xpi
# For Chrome
# Use Chrome's "Pack extension" feature in chrome://extensions/
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test thoroughly on both Firefox and Chrome
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Firefox: Tested on Firefox 90+
- Chrome: Tested on Chrome 90+
- Edge: Should work (Chromium-based)
activeTab
: Access current tab for ESI processingstorage
: Store extension settings and statistics<all_urls>
: Make HTTP requests to fetch ESI fragments
The extension consists of three main components:
- Content Script (
content.js
): Scans pages for ESI tags, fetches fragments, and replaces content - Popup Interface (
popup.js
): Provides user controls and displays statistics - Background Script (
background.js
): Manages extension state and icon updates
ESI tags not being replaced:
- Check that the extension is enabled (green icon)
- Verify ESI URLs are accessible from your browser
- Check the browser console for error messages
Custom headers not working:
- Ensure header names and values are correctly formatted
- Some headers may be restricted by browsers for security
Statistics not showing:
- Refresh the page after enabling the extension
- Check that ESI tags exist on the current page
Open browser developer tools to see detailed logging:
- Content script logs appear in the page console (F12)
- Popup logs appear when inspecting the popup (right-click extension icon → Inspect)
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Built with assistance from AI
- Inspired by the need for local ESI testing in development environments
- Thanks to the open source community for browser extension development resources
- Initial release
- Basic ESI tag resolution
- Statistics tracking
- Custom headers support
- Jump navigation
- Visual icon indicators
If you encounter issues or have questions:
- Check the Issues page
- Create a new issue with detailed information about your problem
- Include browser version, extension version, and steps to reproduce
Disclaimer: This extension is for development and testing purposes. Do not use in production environments where security is critical.
This text has been AI-Generated.