Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URL to address in page data?

We have a JavaScript widget which loads data from an URL.

To reduce round-trips I would like to avoid a second HTTP request and put the data into the HTML page.

It would be great if I could leave the JavaScript widget unchanged.

Is there a URL scheme to read data from the current HTML page?

Example: Instead of https://.... this dom://....

like image 1000
guettli Avatar asked Nov 27 '15 07:11

guettli


People also ask

What is a URL the address of a document?

A URL (Uniform Resource Locator) is a unique identifier used to locate a resource on the Internet. It is also referred to as a web address. URLs consist of multiple parts -- including a protocol and domain name -- that tell a web browser how and where to retrieve a resource.

What are the 3 parts of a URL?

To recap, these are the three basic elements of a website URL: The protocol – HTTP or HTTPS. The domain name (including the TLD) that identifies a site. The path leading to a specific web page.


1 Answers

No, but you can use data URIs, if that's a feasible approach for you. It's not the best choice for large amounts of data though.

like image 140
a better oliver Avatar answered Sep 21 '22 15:09

a better oliver