Closed
Bug 1502417
Opened 7 years ago
Closed 7 years ago
Page doesn't load in Firefox, does in Chrome. Seems like XML parsing issue.
Categories
(Core :: XML, defect)
Core
XML
Tracking
()
RESOLVED
INVALID
People
(Reporter: djvj, Unassigned)
References
()
Details
This page's infographic loads quickly in Chrome. Doesn't load in Firefox.
Looking at web console output shows the following:
XML Parsing Error: not well-formed
Location: https://eig.org/dci-maps-2018/data/2018/natl_counties.geojson
Line Number 1, Column 1:
natl_counties.geojson:1:1
XML Parsing Error: not well-formed
Location: https://eig.org/dci-maps-2018/data/2016/natl_counties.geojson
Line Number 1, Column 1: natl_counties.geojson:1:1
No such error shows on Chrome errors.
Updated•7 years ago
|
Component: General → XML
Product: Firefox → Core
Comment 1•7 years ago
|
||
So, natl_counties.geojson, is JSON, but it's being treated as XML when XHR is called. Firefox is doing the right thing, by the looks of it.
To fix this, the response content-type needs to change to "text/json" and the site needs to make sure it's not using XHR in a way that would treat the JSON as XML.
Unfortunately, the JS is all minified, so I could not actually check what's actually happening.
An alternative would be to use the fetch API, which supports JSON parsing:
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
Without the un-mimnifed code, I can only assume this is invalid.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•