{"id":13397842,"url":"https://github.com/jstrieb/urlpages","last_synced_at":"2025-04-14T19:46:38.677Z","repository":{"id":54024634,"uuid":"194475742","full_name":"jstrieb/urlpages","owner":"jstrieb","description":"Create and view web pages stored entirely in the URL ","archived":false,"fork":false,"pushed_at":"2025-01-25T01:39:54.000Z","size":1292,"stargazers_count":1376,"open_issues_count":3,"forks_count":129,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-07T17:01:48.421Z","etag":null,"topics":["css","html","javascript","url","web-development"],"latest_commit_sha":null,"homepage":"http://jstrieb.github.io/urlpages","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jstrieb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-30T04:44:14.000Z","updated_at":"2025-04-01T06:48:15.000Z","dependencies_parsed_at":"2025-02-03T00:41:01.453Z","dependency_job_id":null,"html_url":"https://github.com/jstrieb/urlpages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Furlpages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Furlpages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Furlpages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Furlpages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstrieb","download_url":"https://codeload.github.com/jstrieb/urlpages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248950857,"owners_count":21188358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","html","javascript","url","web-development"],"created_at":"2024-07-30T18:01:48.272Z","updated_at":"2025-04-14T19:46:38.645Z","avatar_url":"https://github.com/jstrieb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# URL Pages\n\n[jstrieb.github.io/urlpages](http://jstrieb.github.io/urlpages)\n\n## About\n\n- Create web pages in the simple, fast editor\n- Share code that others can edit and modify\n- Clone web pages with the bookmarklet (under active development)\n- \"Publish\" web pages instantaneously\n- Published links never stop working and ~cannot be taken down~ function as\n  long as this site is trusted and extant\n- No dependencies\n- No signups\n- No tracking\n- No hosting\n- No cost\n- No commitment\n- A few hundred total lines of clear, well-documented HTML, CSS, and JavaScript\n\nRead the Hacker News Discussion\n[here](https://news.ycombinator.com/item?id=20317840)\n\n\n## Encrypt\n\nIt is now possible to encrypt URL Pages using [Link\nLock](https://github.com/jstrieb/link-lock). This static, distributed web\napplication uses AES in the browser to encrypt the URL without transmitting any\ndata. The encrypted link is then stored in a Link Lock URL, which, when\nvisited, can only be unlocked with a password.\n\n\n## How it works\n\nAs hinted by its name, URL Pages works by storing the entire contents of a web\npage in the URL.\n\nThus, as long as the URL exists, so does the page it points to. The rest of the\nURL Pages program is responsible for translating between web page code\n(HTML/CSS/JavaScript) and an \"encoded\" URL.\n\n- The **main page** takes encoded data from the URL, decodes it into regular\n  web page format, and displays it to the user\n- The **editor** encodes user-created web page data as a link that can be\n  shared\n- The **bookmarklet** takes a page that already exists and encodes it as a link\n  that can be shared\n\nWhen the main page is visited, the data is encoded in the URL using base 64\nencoding via JavaScript's `atob` and `btoa` functions in conjunction with its\n`encodeURIComponent` and `decodeURIComponent` functions. The encoded data is\nstored in the\n[hash](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash#Examples)\nportion of the URL.\n\nIn the editor, data is similarly encoded, except that the HTML, CSS, and\nJavaScript portions are stored separately in one object that is converted to a\nJSON string before being base 64 encoded.\n\nThe obvious downside of URL Pages is that the links get very long very quickly.\nLuckily, some URL shorteners are able to accommodate fairly long URLs (shoutout\nto [TinyUrl](http://tinyurl.com)). In a strange way, this effectively means the\nlink shortener is acting as the web host since it is responsible for storing\nthe record of the web page's data. For simple web pages (and even simple page\nhierarchies), URL Pages have proven reasonably easy and effective to use,\nhowever it quickly becomes infeasible to use for large sites or large embedded\nimages.\n\n\n## Disclaimer\n\nThis just becomes a toy if I am the only one hosting a running version of this\nrepository. If you believe it has real potential, clone it or fork your own\nversion that addresses any non-fundamental problems you have with it, and host\nyour own. The only way this actually becomes robust is if there is no single\npoint of failure (i.e. my GitHub Pages)\n\nWeb pages in URLs are definitely not how things on the web were meant to be\ndone, so don't be surprised if trying to use URL Pages causes unexpected\nissues. For example, sharing these links may cause chat programs, email\nclients, and unsuspecting individuals to get confused, raise exceptions, or\ncomplain. Likewise, copy-pasting these links may take a long time, if it works\nat all. I've also noticed my browser running a little hotter while I've got 5MB\nlinks in the URL bar.\n\nFurthermore, URL Pages is very much a proof of concept, and should not be\nrelied upon for anything consequential.\n\nRead the code and understand it before using so that you understand any\nassociated risks. The codebase was written with readers in-mind. Since the\ncodebase is intentionally short, it can be read and digested fairly quickly if\nyou have prior experience with client-side web applications.\n\nI originally conceived this as a simple, static CodePen clone, but I felt the\n\"publishing\" of pages as URLs was an interesting idea. So I decided to present\nthat aspect of it front and center, even though it wasn't really the point of\nthe project at the beginning. About a year ago, I had a proof of concept\nversion that I ended up using fairly frequently for sharing quick\nHTML/CSS/JavaScript experiments (never as a means of seriously publishing and\nsharing censorship-proof content). I found that if its use is limited to that\ncase, it is actually very handy and robust!\n\n\n## Examples\n\nThe following examples were made and \"published\" using the provided [code\neditor](http://jstrieb.github.io/urlpages/editor).\n\n- My personal website\n    - Code in the code editor [here](https://tinyurl.com/y64dmsqm)\n    - \"Published\" version [here](https://tinyurl.com/y5w9ybk2)\n- Bookmarklet setup page\n    - Code in the code editor [here](https://tinyurl.com/y5r8y4v4)\n    - \"Published\" version [here](https://tinyurl.com/y3lw36uh)\n- A page with embedded images (no external image host)\n    - Code in the code editor\n      [here](http://jstrieb.github.io/urlpages/examples/embed-code.html)\n    - \"Published\" page\n      [here](http://jstrieb.github.io/urlpages/examples/embed-page.html)\n\nThe following examples were cloned from existing pages using the bookmarklet.\n\n- My dad's food blog\n  [here](http://jstrieb.github.io/urlpages/examples/food-blog.html)\n- The entire [editor](http://jstrieb.github.io/urlpages/editor) encoded in the\n  URL [here](https://tinyurl.com/y6nx5347)\n- This GitHub project page\n  [here](http://jstrieb.github.io/urlpages/examples/project-page.html)\n- A cloned New York Times Article\n  [here](http://jstrieb.github.io/urlpages/examples/nyt.html)\n\n\n## Bookmarklet\n\nCurrently, the bookmarklet is very much in-development (read: mostly doesn't\nwork). Feel free to try it anyway by visiting the link below and following the\ninstructions.\n- [Bookmarklet instruction page](https://tinyurl.com/y3lw36uh)\n\nCode for the bookmarklet can be found in\n[`bookmarklet.js`](https://github.com/jstrieb/urlpages/blob/master/bookmarklet.js).\n\nThe bookmarklet enables some of the most interesting and promising\nopportunities for URL Pages. Namely: cloning pages for archival purposes,\nsharing restricted information to bypass censorship, bypassing paywalls,\nstoring entire pages in bookmarks, etc.\n\n\n## Related Projects\n\nSince its original creation, it has been forked many times. Please open an\nissue if you would like me to link back to a fork or mirror.\n- One particularly improved version is JSPen\n    - [JSPen](http://jspen.co)\n    - [Post](https://medium.com/swlh/creating-jspen-a-codepen-like-editor-that-stores-pages-in-urls-b163934f06c8)\n      about the creation of JSPen\n\nSimilar in some ways (though unrelated) to the following projects\n- [itty.bitty.site](https://github.com/alcor/itty-bitty)\n- [TinyEditor](https://github.com/umpox/TinyEditor)\n\n\n## Project Status\n\nThis project is actively maintained. If there are no recent commits, it means\nthat everything has been running smoothly! URL Pages is designed to be 100%\nbackwards-compatible, so your links will never break.\n\nEven if something were to happen to me, and I could not continue to work on\nthe project, URL Pages will continue to work as long as my GitHub account is\nopen and the [jstrieb.github.io](https://jstrieb.github.io) domain is online.\n\n\n## To-do\n\n- Improve the bookmarklet -- it's mostly unusable as of right now\n    - Fix relative vs absolute linking\n    - Maybe try embedding images\n    - Import all `src`ed scripts directly\n- Improve UI in general and editors beyond simple `textarea` (perhaps integrate\n  Ace or CodeMirror)\n- Make the buttons better/more efficient (don't update `href` on every key\n  press)\n- Figure out and publish max URL sizes for various URL shorteners\n- Implement URL compression using\n  [Brotli](https://en.wikipedia.org/wiki/Brotli) for shorter URLs\n- Add option to \"publish\" pages using base65536 as suggested\n  [here](https://github.com/jstrieb/urlpages/issues/5)\n- Upload examples of multi-page sites (tree hierarchy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrieb%2Furlpages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstrieb%2Furlpages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrieb%2Furlpages/lists"}