I found a better method.
1. Turn Wifi Off
2. Boot up your 3DS
4. Open Internet Browser
5. Make a new bookmark for
http://go.gateway-3ds.com
6. Clear history and cookies
7. Go back to Tools where bookmarks are, the page should be blank behind
8. Quit Internet Browser and reopen, the page should be blank and the 3DS will have saved this state.
9. Turn back Wifi
Once you set that up, you can keep your wifi on, and you can follow this so you can have a clean launch every time so you don't get anymore errors:
1. Boot your 3DS
2. Quickly launch into Internet Browser and open the Gateway bookmark
3. The page will load just in time for the internet to connect, so it'll never visit another page to fill with cookies or history so you won't get the error anymore.
4. Profit.