문제

Is it possible to use a DataURI instead of a URL in an XmlHttpRequest (AJAX) call so it's not really going over the wire rather using data that's already in the client? I'm going to experiment with it, but I wanted to see if anyone has done something like that or if it's even possible. Thanks!

Context: My use case is to work around a problem I'm facing in OpenLayers where they expect a URL, but I have the data on the client already and want to load it directly since it's a large file.

도움이 되었습니까?

해결책

The answer here is that you cannot use DataURI with XmlHttpRequest. As pointed by @dandavis above, it is a different protocol.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top