Magic Map Not Working
If the Magic Map doesn't open at the requested location and/or produces an error that includes the message "Unexpected identifier 'denied'" then this is likely to be due to a security enhancement in the browser's handling of cookies. Basically, the Magic Map is now unable to set its cookies in an iframe as the Magic Map has not specified that this is allowable. For technical details please see this page.
The latest versions of Google Chrome and Microsoft Edge have this enhanced handling which results in the Magic Map not working when it's loaded in an html iframe (which is how Magic MapIt! loads it). Currently Firefox doesn't have this enhancement and therefore allows the Magic Map to operate correctly in an html iframe. At some point in the future Firefox will 'catch-up' with Google Chrome and Microsoft Edge and also include the same enhancement.
Solution
The only viable solutions to this issue are to either:- Set a browser option, if one is available, to allow the Magic Map to set its cookies when loaded in an iframe, or
- To use a browser extension that can modify Magic Map cookie requests to add the required cookie flags (namely "SameSite=None" and "Secure") to allow the cookies to be set in an iframe
Firefox currently has a browser option that allows the cookie restrictions to be relaxed for specific domains. Therefore, it's expected that when Firefox implements the cookie security enhancement a simple browser option change can be made. For Google Chrome and Microsoft Edge the work around used to be to install the HiFrame extension. Unfortunately the extension doesn't now work on the most recent releases of Google Chrome and Microsoft Edge (as of 2025). If anyone knows of a way to allow cookies to be set in an iframe for these browsers then please let me know.
The following sections detail how each browser can be modified to allow Magic MapIt! to use the Magic Map.
Google Chrome
As of 2025, it's not possible to use Magic MapIt! on Google Chrome.
Microsoft Edge
As of 2025, it's not possible to use Magic MapIt! on Microsoft Edge.
Firefox
Note: Only follow these instructions if the Magic Map stops working in Firefox.
- Enter about:config in the URL bar
- Click 'Accept the Risk and Continue'
- Enter network.cookie.sameSite.laxByDefault.disabledHosts in the search field
- Click the pencil icon
- Enter magic.defra.gov.uk in the entry box
- Click the 'tick' box.
Magic MapIt! should now be able to load the Magic Map correctly.