Files
explorer-monorepo/docs/BROWSER_CACHE_FIX.md

68 lines
2.0 KiB
Markdown

# Browser Cache Issue - Fix Instructions
## Problem
The browser is using cached JavaScript, causing:
- Old error messages
- HTTP 400 errors that don't match the actual API response
- Line numbers that don't match the current code
## Solution
### Method 1: Hard Refresh (Recommended)
1. **Chrome/Edge (Windows/Linux)**: Press `Ctrl + Shift + R` or `Ctrl + F5`
2. **Chrome/Edge (Mac)**: Press `Cmd + Shift + R`
3. **Firefox**: Press `Ctrl + Shift + R` (Windows/Linux) or `Cmd + Shift + R` (Mac)
4. **Safari**: Press `Cmd + Option + R`
### Method 2: Clear Cache via Developer Tools
1. Open Developer Tools (F12)
2. Right-click the refresh button
3. Select **"Empty Cache and Hard Reload"**
### Method 3: Disable Cache in Developer Tools
1. Open Developer Tools (F12)
2. Go to **Network** tab
3. Check **"Disable cache"** checkbox
4. Keep Developer Tools open while testing
5. Refresh the page
### Method 4: Clear Browser Cache Completely
1. Open browser settings
2. Navigate to Privacy/Clear browsing data
3. Select "Cached images and files"
4. Choose "Last hour" or "All time"
5. Click "Clear data"
6. Refresh the page
## Verification
After clearing cache, you should see:
- ✅ New console messages with detailed error logging
- ✅ "Loading stats, blocks, and transactions..." message
- ✅ "Fetching blocks from Blockscout: [URL]" message
- ✅ Either success messages or detailed error information
## Expected Console Output (After Fix)
**Success:**
```
Ethers loaded from fallback CDN
Ethers ready, initializing...
Loading stats, blocks, and transactions...
Fetching blocks from Blockscout: https://explorer.d-bis.org/api/v2/blocks?page=1&page_size=10
✅ Loaded 10 blocks from Blockscout
```
**If Error:**
```
❌ API Error: {status: 400, ...}
🔍 HTTP 400 Bad Request Details:
URL: https://explorer.d-bis.org/api/v2/blocks?page=1&page_size=10
Response Headers: {...}
Error Body: {...}
```
## Note
The API works correctly (verified via curl), so any HTTP 400 errors after clearing cache will show detailed information to help diagnose the actual issue.