Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at



Enables you to read content from a URI.



readURI(uri, options)

Reads a URI and returns a promise.


uri : string
The URL, as a string, to load.

options : object
Optional options:

Name Type  
sync boolean

If this option is set to true, the promise returned will be resolved synchronously. Defaults to false if not provided.

charset string

The character set to use when read the content of the uri given. Defaults to UTF-8 if not provided.


promise : The promise that will be resolved with the content of the URL given.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,