explorer
explorer copied to clipboard
Remove redirect in SSR
We could remove the redirect in the nextjs middleware to shave ~300ms off the first request and improve our SEO.
below an example where it's ~590ms, but this can vary.

The middleware does a redirect because it handles first the chainId (mainnet or testnet), but we could maybe try to handle it client side without using any store server side
if the request has ?chain=mainnet or ?chain=testnet => nothing to do, the current code handles this
if the request does not have ?chain=X or X is invalid, default to mainnet and set the query params client side and set the activeNetwork to mainnet)
At least we should ignore woff fonts and the favicon.png redirects