U
U
uRoot2018-06-04 20:57:42
Uniform Resource Identifier
uRoot, 2018-06-04 20:57:42

Is it possible to put the site entirely in the URL bar?

The question has long been interesting: is it possible to completely place the site in the URL bar, along with the page code and media files? Partially, for example, it is possible with the help of data: URL (data schemes)
After all, as such, there are no restrictions on the length of the URL in browsers: link


  • And if it is possible, then how to implement it?
  • And if so, what are the advantages of such a site?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
mars3, 2019-11-15
@uroot

Yes, you can. itty.bitty.site
Read: https://nplus1.ru/news/2018/07/06/url

K
key don, 2018-06-05
@keydon2

This is a perversion and like any perversion should not exist.
Perhaps even violates some RFC.
There are long-proven mechanisms - headers, query string. Use them to generate.

M
Moskus, 2018-06-04
@Moskus

A very strange question. For starters, it would be worth asking yourself, "why?" So really, what is the practical use case you envision?
As for the possibility of implementation, there is one significant problem with this: in order to decode the content of such a URL and turn it into a page, you need a "loader" of this content, that is, a physically existing page with an empty bodyand some JavaScript code in the header that will read URL, decode it, and embed it into the page's DOM tree. Thus, the direct answer to the question, is it possible to put the page code completely in the URL - no, it is not possible, since you need a code loader from the URL.

S
synapse_people, 2018-06-04
@synapse_people

but there is a length of data:, 65kb.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question