[HN Gopher] A URL Lengthener
___________________________________________________________________
A URL Lengthener
Author : ykdojo
Score : 663 points
Date : 2021-05-14 16:28 UTC (6 hours ago)
(HTM) web link (aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com)
(TXT) w3m dump (aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com)
| floatingatoll wrote:
| On iOS, the location bar animates scrolling through the aaaaaas
| when you navigate to the site. Someone had to design that
| animation. Thank you, anonymous designer.
| ykdojo wrote:
| Source code:
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| russianGuy83829 wrote:
| Great work! A bit of an edge case, but you do not handle
| cyrillic (and potentially other non-latin URLs) correctly.
| kts.rf didn't work for me.
| piemadd wrote:
| Hey actual author here! Seems like thats something with js
| being dumb. Maybe i'll add a checkbox to allow for an
| override
| gus_massa wrote:
| Somewhat related
|
| https://news.ycombinator.com/item?id=19511735 (45 points | March
| 28, 2019 | 32 comments)
|
| https://news.ycombinator.com/item?id=24229085 (17 points | 8
| months | 7 comments)
| kristopolous wrote:
| The multiple efforts thing is a lesson I should learn but
| refuse to do.
|
| It just feels so spammy. I don't want to touch that world
| intentionally but it works.
|
| It gets worse
|
| I had two similar services, one that used a page's meta
| information to create URL stubs so that the link would have the
| semantic meaning in it instead of say "id=27158278". It'd also
| (this is about 10 years ago) fill in opengraph holes if found
| and present the social media card generators with more complete
| information.
|
| It also had a JavaScript plugin that would fill in title tags
| to your anchor links so that you could hover over a link and
| get the destination page's title.
|
| I thought it was really useful but I literally got nothing but
| either silence or criticism. It was really demotivating. I just
| abandoned it.
|
| It sucks to create something that you believe in, that you
| like, that you find value in and get nothing but hot bottles of
| shit from everyone else. Nothing constructive, just
| demoralizing abuse. I've tried so hard to never be that person.
| The receiving end of that is awful. It's never ok. (I should
| make a list of "never events" in open source/programming
| (https://en.m.wikipedia.org/wiki/Never_event) not in
| engineering negligence but human empathy negligence.)
|
| Anyways, then I had another project (also about 10 years ago)
| where I registered a bunch of news sounding sites, like say,
| themercurystar.com and as a url "shortener" it created absurd
| sensationalist news headlines as the "shortened" URL from a
| grammar generator. So for instance, you may get a url like
| themercurystar.com/arts/current/henry-kissinger-sings-dances-
| on-broadway-in-bye-bye-birdie or /taylor-swift-proves-hodge-
| conjecture-pnas etc.
|
| It was complete with the opengraph of a stock image and a
| repurposing of the generative title with more filler to make it
| like look real, redirecting the crawlers to a fake shell page
| to satisfy the meta content and redirecting the humans to the
| actual link to be shortened.
|
| That one was probably too good. I found it hilarious but
| apparently I was the only one in on the joke.
|
| So failure again. Ah well.
|
| They're still great and I'd gladly launch them again.
| gus_massa wrote:
| I don't understand. Are you the creator of the other service?
| grumple wrote:
| Meh... These links could be longer... can we get a URL Lengthener
| Lengthener?
| [deleted]
| andrewmcwatters wrote:
| I've never thought about a practical URL that couldn't be
| accessed by specific browsers based on length as something
| someone would explicitly _want_ versus something to avoid until
| this post.
| saltmeister wrote:
| so useless
| gumby wrote:
| A handy link to this discussion:
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| jhgb wrote:
| "He must have died while typing it" comes to my mind...
| MR4D wrote:
| I clicked on your link, half expecting to get rick-rolled, and
| was pleasantly surprised to find myself back on this same
| page.... but also kinda disappointed. :)
|
| +1 for avoiding the temptation.
| marmot777 wrote:
| I miss getting Rick Rolled.
| brink wrote:
| Here you go, sweetheart. https://aaa.aaaaaaaaaaaaaaaaaaaaaa
| aaaaaaaaaaaaaaaaaaaaaaaaaa...
| 9dev wrote:
| Darn it! That's even worse!
| michaelgrafl wrote:
| Savage.
| jakemal wrote:
| I'd bet 30% of the URLs it lengthens are rick-rolls. I did it
| immediately and sent it to several people on Slack.
| marmot777 wrote:
| Noice!
| marmot777 wrote:
| Awesome!
| dbish wrote:
| Love it. Always looking for new weird side projects. Can't be too
| productive on your hobby software
| annoyingnoob wrote:
| Scraper? Honeypot?
|
| I guess my tinfoil hat is too tight. While its cool and funny I
| inherently don't trust things like this.
|
| Edit: the concern is about data collection and profiling over
| time, it could essentially be an advertising model, you get an
| idea of things a particular cookie/IP/fingerprint does. depending
| one what is in your original link, all kinds of ids and data can
| be sitting in the url alone. Does a link to my social media
| account potentially expose my PII?
| potatoman22 wrote:
| Why not?
| gouggoug wrote:
| What exactly do you not trust here? What bad could come out of
| you typing a URL in this website?
| bruhhh wrote:
| funny project but why are you tracking the people visiting the
| website??
| soheil wrote:
| The problem with this is that when I hold and press "a" in the
| address bar on mac at least alternate characters menu pops up
| instead of the key being repeated. I'd suggest this new domain:
|
| 1234567890qwertyuiopasdfghjklzxcvbnm.com
| dang wrote:
| We took "Show HN" out of the title because it implies that the
| project is the submitter's own personal work. Please don't do
| that if it isn't. The rules are here:
| https://news.ycombinator.com/showhn.html.
|
| https://news.ycombinator.com/item?id=27157877
| nhumrich wrote:
| really isn't long enough. was expecting 56 subdomains of 56 a's,
| with at least 5 times the path length
| hoten wrote:
| I was inspired by a certain someone's meandering speech patterns
| to do something similar some years ago: https://www.biglyurl.com/
| yboris wrote:
| Example result:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
|
| Stellar!
| kome wrote:
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| captn3m0 wrote:
| Ran it through a few more times:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| [deleted]
| google234123 wrote:
| > Disclaimer: Since there is a maximum letter count to a URL,
| there is a slight chance your resulting URL will be too long to
| use. No worries, try running it through a site like bit.ly and
| then paste that one over here. Every resulting URL ends up having
| a minimum number of characters, so your URL will still be plenty
| long!
|
| This seems like something you can trivially solve yourself. Is
| there any good reason why you push this issue on the user?
| piemadd wrote:
| Since there really isn't any set maximum, I didn't have
| anything to base it off of. I might actually remove that
| section since I've seen 24k-long URLs work perfectly fine. Also
| I would have to do some reworking to have that happen since the
| url lengthening is all browser-side right now.
| drdec wrote:
| I think it is because it is not implemented the way (I imagine)
| URL shorteners to be implemented with a database back-end to
| map the short tokens to the actual sites. Instead it just
| performs a reversible transform on the URL. This way the site
| is really just a static website (and I imagine a lot cheaper
| for the owner who can't be interested in laying out a lot of
| money for this).
|
| But this is just a lot of speculation on my part which means
| I'm probably wrong about at least one aspect.
| w-j-w wrote:
| It's possible that this project is intended as humor, and a
| humorous workaround achieves that better than a technical fix.
| jerf wrote:
| There isn't really "a" maximum count. There's a variety of
| enforced limits. If the standard(s) even set an official one,
| it's not something a lot of things pay attention to. You also
| can encounter problems with things like command lines enforcing
| their own limits, making a URL that your browser may or may not
| be happy with not be something you can directly curl or wget.
| strict9 wrote:
| Love it.
|
| This is going in the toolbox along with http://shadyurl.com
| bombcar wrote:
| Heh it can't handle URL Lengthened URLs.
| scubbo wrote:
| Lol. I clicked this on my (managed) work laptop, and
| immediately got a Compliance warning popup. I don't know what I
| expected...
| schwap wrote:
| Same. "Your organization's policy prohibits access to
| websites categorized as Tasteless & Offensive.". How rude!
| whymauri wrote:
| Facebook will automatically censor a lot of them, lol.
| excalibur wrote:
| http://www.5z8.info/guns_v9t4pi_click-on-this-and-youll-be-t...
| Robotbeat wrote:
| That is hilarious... And potentially practical! One way to
| discourage security-conscious strangers from clicking on your
| links!
| josefresco wrote:
| Below is a link I generated for https://twitter.com/home
|
| http://www.5z8.info/winamp-cracked.exe_x8c5se_how2pipebomb
|
| Thank you for this, I laughed hard.
| divs1210 wrote:
| That's really funny :'-D
| Sohcahtoa82 wrote:
| Hilarious!
|
| Though I'm kind of disappointed about the lack of HTTPS support
| on that site.
| seumars wrote:
| Sounds quite on brand to me!
| raldu wrote:
| And wouldn't that be actually a feature!
| 0-_-0 wrote:
| Yeah, that seems shady...
| devoutsalsa wrote:
| Hehe. Reminds me of Freaking Huge URL, which sadly is no longer
| with us.
|
| https://lifehacker.com/freaking-huge-url-lengthens-too-short...
| ergot_vacation wrote:
| This is the kind of project we need more of. No politics, no
| perverse economic incentives. Just one human helping other humans
| utterly obliterate their address bar.
| breck wrote:
| I love long URLs and build them into my apps for sharing. You can
| have powerful apps that are 100% clientside and use just a dumb
| file web server.
|
| For example, here's a URL that contains both the grammar for a
| language that compiles to CSS and also example code. Works like a
| charm.
|
| https://jtree.treenotation.org/designer/#grammar%0A%20toolin...
| jstrieb wrote:
| Having written two apps that do this, I can confirm that it is
| an amazing technique, and criminally underutilized! My projects
| store and render entire pages from the URL and encrypt URLs
| (respectively):
|
| https://github.com/jstrieb/urlpages
|
| https://github.com/jstrieb/link-lock
| breck wrote:
| Love it!
|
| Have you thought about having a non-obfuscated pretty
| version?
|
| In addition to this:
|
| https://jstrieb.github.io/urlpages/editor/#eyJjc3MiOiJ3aG9tI.
| ..
|
| Offer a pretty version like:
| https://jstrieb.github.io/urlpages/editor/#html...html-here.~
| css...body;background:red;~javascript...document.write('this-
| was-written-by-javascript.')
| g3ol4d0 wrote:
| you got a xss bro
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| piemadd wrote:
| doesn't work anymore >:)
|
| with the pure speed of replit i went from issue opened to
| closed in like 20 minutes
| whoisburbansky wrote:
| Wait could you explain a bit more how replit let you fix it
| so quickly
| piemadd wrote:
| Well, I use Replit as an ide and just hitting the run
| button meant my fix was immediately deployed. didn't have
| to push to git or wait ssh into a machine to pull from
| master and restart
| JonathanMerklin wrote:
| Thought I'd comment to note that (as of 2021-05-14T22:07:00Z)
| this just does the alert() POC and isn't nefarious, if anyone
| is deeply curious enough to click but cautious enough to avoid
| a deaddove.jpg situation
| piemadd wrote:
| Just fixed this a few minutes ago, thanks to those who told
| me about it! (look for v1.4.2 on npm and the corresponding
| commit on github)
| amelius wrote:
| Can you use these urls in tweets?
|
| If so, how many of these urls would fit in a tweet?
| kamyarg wrote:
| IIRC twitter converts+replaces links using its' own url
| shortener and every link takes constant "space" so I think long
| links would not affect how many links you can put in.
| piemadd wrote:
| i need to check, but i think twitter breaks when you paste one
| in :grimace:
| hvenev wrote:
| This domain uses 56 `a`-s. Interestingly enough 63 `a`-s .com is
| also a URL lengthener:
| http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| limeblack wrote:
| Try scrolling to the right they have an infinite scroll with
| a's going.
| divs1210 wrote:
| That's very weird!
|
| How did you even find this?
| neal_jones wrote:
| Sometimes instead of typing google.com I end up typing
| gooooooooogle.com
| Zamicol wrote:
| For the curious, aaa[...].com is just converting your string to
| hex, and then replacing the hex with various types of "A"'s.
|
| If you wanted to use an alphabet other than 16 characters, you
| could do arbitrary base conversion: https://convert.zamicol.com/
|
| This would allow you to use more or less characters.
| regus wrote:
| This reminds me, I did a little investigation into what the
| actually URL length limits are per browser. Here is the blog post
| in case you are interested:
|
| https://joelregus.com/posts/url_length_limits/
| [deleted]
| Lorin wrote:
| I keep http://www.whyisyourdomainnamesolong.com as an email
| forwarder. Surprisingly memorable.
| colllectorof wrote:
| I rarely use Discord these days, but when I need to link
| something next time, I'll use this service. (Discord still
| doesn't support hyperlinks.)
| tass wrote:
| I lengthened the lengthener URL about 7 times before my browser
| complained it was too long
| geocrasher wrote:
| Back in the early days of web hosting I recall that a customer
| had a domain name that was literally as long as ICANN would allow
| at the time. It was very nearly a full sentence. I don't recall
| the limit but this domain
|
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com
|
| is 57 characters (not including .com) and I think that sounds
| familiar. One could have a lot of fun with that if they wanted to
| (and such as was done in this case).
|
| Then there's
|
| http://llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogog...
| reaperducer wrote:
| Some companies still don't mind long domain names.
|
| This one launched very recently:
| https://www.hardrockcasinonorthernindiana.com
|
| Nearby, the Chicago Botanic Garden went short:
| https://ohwow.org
| MandieD wrote:
| I remember this one:
| http://www.modestapparelchristianclothinglydiaofpurpledresse...
| - sadly, it appears they gave up the site, but Wayback Machine
| also remembers it.
| piemadd wrote:
| i also own the maximum length aaaaaa.com domain, but i had
| issues with connecting it lol. working on having it redirect to
| this domain though
| AdmiralGinge wrote:
| >http://llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogog..
| .
|
| Welsh place names can be brilliantly literal, Aberystwyth for
| example is "mouth of the river Ystwyth".
| Llanfairpwllgwyngyll... means "St Mary's church of the pool of
| the white hazels over against the pool of St Tysilio Gogo" but
| the name was completely contrived in the Victorian era to
| promote tourism to Anglesey.
| banana_giraffe wrote:
| It's been years since I've seen or heard an ad for
| dontbeaweekendparent.com, but I still remember it, even though
| there's zero chance I'll ever need their services. Sometimes a
| long domain name can be useful.
| BenjiWiebe wrote:
| howmanypeopleareinspacerightnow.com
|
| doesthemailruntoday.com
|
| Are the two I like.
| bencoder wrote:
| I remember weallgetthingscheaperwhenwebuyinagroup.com Which I
| think was advertised on TV in the UK when I was a teen
| david422 wrote:
| Reminds me of an API I worked on. We had a max length for some
| token. A client had an incrementing sequence number, so they
| decided to pad it out to the max length. It looked something like
| this:
|
| A00000000000000000000000000000000000000000000000000001
|
| A00000000000000000000000000000000000000000000000000002
|
| etc
| shadowgovt wrote:
| That _does_ solve the problem of having to worry about whether
| the data is sorted lexically or by numeric value.
| greenshackle2 wrote:
| I'm a bit disappointed that the lengthened URL for
| http://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| itself doesn't work. That is:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
|
| EDIT: Uh, I don't know what I did differently, but this one
| works:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
|
| EDIT: Looks like the site is actively being updated, there are
| new option checkboxes, the self-reference link only works with
| "Use a path instead of an URL" checked
|
| EDIT: I repeatedly lengthened maybe a dozen times, that seems to
| get it stuck in a loop:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| nemacol wrote:
| Fyi - I posted this link to the sub
| https://www.reddit.com/r/AAAAAAAAAAAAAAAAA/
|
| It seems to fit very well there.
| piemadd wrote:
| 1 step ahead of you ;)
| https://www.reddit.com/r/AAAAAAAAAAAAAAAAA/comments/nc382v/a...
| nemacol wrote:
| Nice! Man, I even search first - I wonder why I didn't see
| it.
| TimLeland wrote:
| haha nice! I built the exact opposite the shortest possible URL
| shortener :) https://t.ly/
| jawns wrote:
| Mind sharing some background? I'm curious about how you snagged
| the domain, how you've managed to monetize it, and what the
| competition is like in this space.
| athenot wrote:
| Thankfully, your URL can be lengthened to this:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| [deleted]
| TimLeland wrote:
| Haha nice that's better!
| cdubzzz wrote:
| Let me shorten that for you:
|
| https://t.ly/MdaT
| schoen wrote:
| For many years (but no longer) Vince Cate's Offshore
| Information Services had a DNS A record for the ccTLD "ai", so
| that http://ai/ was a valid URL that worked in browsers. (A few
| people also had e-mail addresses @ai.)
|
| Today, there are no longer any TLDs of any kind with their own
| A records.
|
| https://www.internic.net/domain/root.zone
| leblancfg wrote:
| Neat! That link worked for me on the latest Chrome
| -\\_(tsu)_/-
| schoen wrote:
| I don't understand how that could be (!).
| necovek wrote:
| Perhaps it auto-prepends "www" to it (since that worked
| for me on FF).
| sharken wrote:
| Found this old comment about it (of course it had to be a
| long URL)
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
| aaa...
| mod wrote:
| Works here, too. Chrome on Android. Got a very basic html
| site with Vi ce Cates' name on it.
| Kelamir wrote:
| Firefox, works just fine.
| schoen wrote:
| But... it doesn't have a DNS record anymore!
| scbrg wrote:
| You sure? $ dig +noall +answer ai.
| ai. 80534 IN A 209.59.119.34
| schoen wrote:
| Huh, this is weird!
|
| The DNS record is no longer in the root zone itself (I
| think it used to be?) and some recursive resolvers seem
| to filter out the bare-TLD query or response. But the A
| record still exists inside the ai zone... so I'm not sure
| who is right, so to speak!
| buffrr wrote:
| The A record was never in the root zone. The root zone
| has an NS record for ai TLD which delegates authority to
| ai nameservers.
|
| You can try `dig @a.root-servers.net ai NS` to get the
| nameserver `a.lactld.org.` which is authoritative for ai.
| You can now try `dig @a.lactld.org ai A` to get it
| (that's how recursive resolves generally work)
| Jiocus wrote:
| There's also https://www.dj/
| enw wrote:
| curl ai
|
| Worked as well.
| caslon wrote:
| It could be shorter still! Stop forcing HTTPS!
| m463 wrote:
| so ftp:// ? or is there something shorter?
| caslon wrote:
| HTTP!
| hundchenkatze wrote:
| I think http is longer than ftp :P
| caslon wrote:
| Yeah, but it's a _web_ URL shortener.
| TimLeland wrote:
| Yes ftp would not work lol
| TimLeland wrote:
| HTTPS is not required. t.ly works fine without "https://"
| caslon wrote:
| Really? The browsers I usually use to test if a site works
| without HTTPS (IE6 and IE8 on XP SP2) can't load it. Weird!
| TimLeland wrote:
| Curious to how you are still running IE6 :)
| caslon wrote:
| It's the default for XP SP2.
| TimLeland wrote:
| Ok so curious why you are running Windows XP :)
| caslon wrote:
| Because I have a need for Internet Explorer 6-8!
| alphabet9000 wrote:
| the http url is a 301 redirect to https so thats why it
| doesn't load ultimately
| caslon wrote:
| Disappointing; that doesn't really count!
| Retr0spectrum wrote:
| You've shortened 6,463,545 links so far. Assuming you're using
| a charset of [A-Za-z0-9], that gives you 14,776,336 total
| possible 4-character URLs. Almost half way there!
|
| What's your plan once you reach the 4-character limit? Roll
| over to 5, or something fancier?
| TimLeland wrote:
| Yes, you are correct. I don't have anything fancy planned.
| Users with accounts are able to customize the ending so this
| will increase the availability. Currently, Bitly is up to 7
| characters long when you create a random short URL. T.LY is
| already 2 characters shorter and there are still plenty of
| short random URLs 62^5 = 916,132,832
| sethammons wrote:
| years ago, we asked bit.ly if they could vendor our link
| shortening and tracking. Turned out we were already a
| couple multiples larger than them in terms of link
| processing. our use case is a bit different though. Instead
| of one link given to many, we tend to be one link given to
| one recipient. Optimizing this kind of problem is
| interesting and fun.
| amasad wrote:
| Awesome to see a Replit app on top of HN! Our hosted apps proxy
| requests per second doubled (3k to 6k) by virtue of this being on
| HN.
|
| This app is fully made and hosted on Replit using Replit DB too:
|
| Frontend: https://replit.com/@piemadd/url-lengthener
|
| Backend: https://replit.com/@piemadd/ax56api
|
| Check out other Replit Apps here (launched yesterday):
| https://replit.com/apps
| soheil wrote:
| What's Replit?
| amasad wrote:
| Online programming environment, community, and platform:
| https://replit.com
| giftedthrowaway wrote:
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| lurkerasdfh8 wrote:
| fun fact. in the browser wars of 1993(?) i looked at the specs
| from netscape (mozilla dady for the young folks) and microsoft
| (what w3c? ha!) and netscape release a browser spec that said "X
| must support up to Y", as in "url must be up to 1024 chars",
| "cookies must be up to 1mb", etc...
|
| then microsoft release IE4 (or 6?) web spec. It was literally a
| copy of netscape's but with "up to" replaced with "at least".
|
| and from this day on, nobody knows about limits on the standard
| and everything was up in the air, just so sites could work on IE4
| and be broken on netscape. Thanks microsoft!
|
| I did some experiments to test the actual URL limit of IE. at the
| time it was around 4MB, but IE would still go over if you got
| creative with hostnames levels and odd schemas.
|
| -- quick edit:
|
| keep in mind, in 1993, the money from giving out free browsers
| where on the servers: netscape server vs microsoft IIS (just like
| today giving free browsers the money is on makig it easier to
| access YOUR content --e.g. default search, etc).
|
| Making your browser crash the competitor server mean that server
| was seen as lower quality. (Same thing with google deliberately
| crashing performance of firefox on their services today[0])
|
| The point of microsoft making this change was to force netscape
| to update their server as they increase the URL limit arbitrarily
| to all IE users.
|
| [0] https://www.zdnet.com/article/former-mozilla-exec-google-
| has...
| tgb wrote:
| Do you happen to have the exact wording? As far as I can tell
| these mean the same thing.
|
| 1. "You must support URL length up to 100 characters" -> your
| browser must support URLs that are 100 characters or less (and
| may or may not support longer ones)
|
| 2. "Your supported URL length must be at least 100 character"
| -> You must support URLs that are 100 characters or less (and
| may or may not support longer ones)
| bulletsvshumans wrote:
| "At least" means more than or equal to. In other words, the
| 'least' it can be is 100 characters, with no upper bound.
| paulddraper wrote:
| Both sentences require browsers to support 100 characters.
|
| Both sentences permit browsers to support 101 characters.
| TchoBeer wrote:
| Exactly, they're functionally the same.
| bulletsvshumans wrote:
| On second pass, you're right. They're the same.
| bigyikes wrote:
| The _supported_ URL length is at least 100 characters, not
| the URL length.
| tgb wrote:
| Yes but "you must support up to 100 characters" also has no
| upper bound - supporting 200 characters also fits that
| requirement.
| bluefirebrand wrote:
| I can see where you're coming from, it does read like
| "MUST support up to 100 characters (and MAY support more
| of you choose).
|
| But honestly I think it's a bad practice to build the
| "may" part, because it's not explicit. The person who
| wrote the spec just as easily could have intended it to
| be "MUST support up to 100 (and may not go over 100)". So
| by not setting a bound you're gambling with your
| implementation being rejected, but setting a bound at 100
| satisfies both possible "implied clauses" of the
| requirement and should not be rejected.
| mypalmike wrote:
| So if you were a programmer on a project and you were
| given a spec that says "up to 100", you would just make
| it unbounded, and for all intents and purposes completely
| ignore the spec?
| devmor wrote:
| "Must" and "Must Not" are keywords in formal spec. If it
| says "Must support up to 100" and doesn't say "Must Not
| support over 100" then I would consider the upper limit
| to be whatever limit is sane for the data type.
| mypalmike wrote:
| So you would pick an arbitrary upper limit based on your
| own notion of what is sane. Picking such a limit, you
| would still need to write the same error handling code
| for limits, but it would happen at maybe 200. And the
| next programmer who inherits your code looks at the spec
| and your code and has to guess "why 200"? And it becomes
| lore. Which is specifically worse than writing to the
| spec.
| lacksconfidence wrote:
| I don't know the exact wording, a gracious reading might be
| (as directed at people writing html)
|
| 1. Never use a URL longer than 100 characters
|
| 2. Go ahead and use a URL longer than 100 characters
|
| As for the true intent? I've no clue.
| tomwojcik wrote:
| Didn't you confuse 'at least' with 'at most'?
| lurkerasdfh8 wrote:
| You are welcome to try to find it. I just failed :(
| ksec wrote:
| I remember there was a site / tools that fit the whole web page
| content within its URL. And it was precisely limited by this
| "standard" where every browser behaves differently.
| vlovich123 wrote:
| I don't know. There's a lot of problems but to me "at least"
| sounds like a more helpful phrasing. Browsers run in such
| heterogeneous compute environments (even back then) that "up
| to" basically cripples you to the lowest common denominator of
| all platforms you target. "At least" makes it mostly the HW
| vendors problem. Sure, MS was encountering this problem more
| because Windows ran on such a large range of HW but think about
| what the world would look like today if you had browser vendors
| putting caps for desktop browsers based on what mobile could
| support.
|
| EDIT: For some limits. For other limits "up to" wording may be
| more appropriate & is still in use (e.g. storage).
| wccrawford wrote:
| The URL can be up to 1024 characters. The browser must
| support at least 1024 character URLs.
|
| They're 2 sides of the same coin, but MS didn't actually
| rephrase the sentence properly. Their version would have
| every URL have _at least_ 1024 characters in it. Any less
| than that, and the browser should reject the URL as invalid.
| jfrunyon wrote:
| It's a lot more likely that the commenter remembering
| something he read 28(!) years later didn't rephrase it
| properly.
| [deleted]
| lurkerasdfh8 wrote:
| > Any less than that, and the browser should reject the URL
| as invalid.
|
| lol. that would have been awesome. domain squatters would
| be running for the 1000 character names while crying about
| all the money they paid for three letters one :)
| simias wrote:
| "At least" seems like a very good way of introducing a DoS
| vector.
|
| I think that 1024 was probably too short as a limit, but I
| think that it does make sense to impose an arbitrary upper
| bound to reject malformed requests early.
|
| I don't see what you mean by "the HW vendor's problem", I can
| assure you that any browser in existence is going to have an
| issue if you send a 1TB URL, while the NIC will have no issue
| transmitting it.
| lurkerasdfh8 wrote:
| You are correct, but microsoft must https://en.wikipedia.or
| g/wiki/Embrace,_extend,_and_extinguis...
| marcosdumay wrote:
| And here's the answer to the sibling asking why it's a
| problem, since they mean exactly the same on practice :)
|
| What it literally means and what people understand when
| reading it aren't the same thing. On this case, for people
| creating sites, "up to" leads immediately into the real
| meaning of the phrase, while "at least" strongly implies the
| opposite. But for people creating browsers, the implication
| is inverted.
| eevilspock wrote:
| Originalism vs strict constructionism vs loose
| constructionism.
| laurent92 wrote:
| I was on a 12-person failed project, the kind of which you owe
| millions to the govt. We had a problem with the search, we
| couldn't get performance.
|
| I told my boss: "See, they wrote 'The old search responded in 2
| seconds. The new search must take at least the same time.' We
| could almost add a sleep(2000) before starting the search."
|
| He went with it. They dealt to drop the requirement on the
| performance of the search on a "mutual agreement."
| lostcolony wrote:
| Ah yes. Checkbox Driven Development. AKA Monkey Paw
| Development, where you give exactly what was asked for; it
| remains surprisingly popular in the government and enterprise
| spaces.
| toomuchtodo wrote:
| Requirements are hard in dysfunctional organizations, or
| those with more stakeholders than capability and agility.
| lostcolony wrote:
| Requirements are hard upfront, period, to the point I'd
| say that any organization trying to set them upfront is
| dysfunctional, tautologically. Making all the decisions
| when you have the least amount of information is a Bad
| Idea.
| sharken wrote:
| Also, how long will it take to build and how much will it
| cost? :)
|
| This is where Agile ought to improve things, but then
| SAFE came along and we were back to square one.
| kenniskrag wrote:
| but there are some architectual significant requirements,
| which have to be known upfront.
| lostcolony wrote:
| I both agree and disagree with you.
|
| There are requirements that will affect architecture
| that, if they're guessed at and turn out to be wrong,
| will lead to massive refactoring and/or large amounts of
| effort being thrown out. 100%.
|
| Where I disagree from most businesses is in the implicit
| belief they have that seems to be "better for devs to be
| idle than for devs to work on code that will be thrown
| away". I'd rather take a guess and start work; best case
| we're right and are ahead; worst case we're wrong and
| have learned some useful lessons.
|
| Which you'll note is the same dilemma as every other
| decision related to the project, with the only difference
| being the scope.
| chromanoid wrote:
| "Monkey Paw Development" was a new one for me :) Thank you!
| Great analogy. Reminds me of this :D
| https://www.youtube.com/watch?v=cDA3_5982h8
| lostcolony wrote:
| Yeah, I just coined it while making the post. :P Less a
| "also (currently) known as" and more of a "also (should
| be) known as". Certainly how I'll be referring to it in
| cynical moments from here on out.
| quasit1 wrote:
| I've worked in such places. The reason it is that way is
| because you will receive a broken
| description/specification/story of what you are supposed to
| implement. You have a choice to make when that happens, you
| either implement it as specified or you reject it because
| it is broken. The problem is that if you do reject it then
| it will take about 6 months to get back a specification
| that is broken in another way and then you have to make the
| same choice...
|
| So after a few iterations you just say "fuck it" and
| implement it as specified and then hope that you get a
| chance to fix it before shipping it (or that it doesn't
| become your headache later on...).
| mattchamb wrote:
| Enterprise developer here. Exactly this. If you reject
| the spec, you won't get another one before the deadline
| that was committed before you got the spec you want to
| reject.
| lostcolony wrote:
| I've been there too, and I know. I'm not speaking to the
| choices devs make (rock and hard place, as you say), but
| the choices the org makes. For government work is driven
| by Congress' procurement process, but for enterprise is
| entirely on upper leadership's perceived need to avoid
| risk. Which is ironically hilarious, since such
| approaches guarantee higher risk, in that they pretty
| much universally lead to late delivery of broken
| features.
| jstrieb wrote:
| I spent some time looking at similar specs for more recent
| browsers, but wasn't able to find anything useful. This was for
| a proof-of-concept I made that stores entire web pages in URLs
| (creatively named "URL Pages") by base64-encoding them and
| putting them in the URL fragment (the part after the "#").
|
| https://github.com/jstrieb/urlpages
|
| The URLs this thing generates get pretty damn big sometimes,
| since I never got around to implementing compression. I can
| confirm that massive URLs from pages with inline images do
| work, but probably take some not-so-optimized code paths
| because they make my computer's fans spin up. Click at your own
| peril:
|
| https://git.io/Jss7V
| jfrunyon wrote:
| Okay, but you can already store web pages in URLs.
| `data:text/html,<h1>Hi%20there!</h1>`
|
| You can even base64 encode them, if you want to.
| jstrieb wrote:
| This is true, but linking to data URIs no longer works.
| Many browsers block them for "security reasons." In
| Firefox, a link to that page is not clickable for me:
|
| https://git.io/JssFK
|
| From a convenience standpoint, it's also far less likely
| that a URL with an http: scheme will be blocked by a random
| web application than one with a data: scheme. For example
| it makes sharing on social media sites and chat
| applications more feasible.
| willcipriano wrote:
| I made a service to store arbitrary files as URLs that is
| similar. The hard part is files that are too large, I can
| handle files up to 5mb if you click on them all via local
| storage. Compression helps a lot as making them base64
| increases the size quite a bit.
|
| https://podje.li
| prox wrote:
| Could you make whole webpages just through urls? Such as
| they will completely portable? Portable being taken with a
| grain of sand ofc.
| lurkerasdfh8 wrote:
| not the entire content, but a hash id is pretty common
| https://en.wikipedia.org/wiki/Magnet_URI_scheme
| naugtur wrote:
| I needed to send data over GET in 2012/2013 and built my own
| tiny LZW-alike compression to squeeze as much as possible
| into the 100kb which seemed to be the safe limit for non-ie
| browsers at the time
| naugtur wrote:
| Here's the repo https://github.com/naugtur/ripper/
| hinkley wrote:
| Didn't IE have buffer overflow attacks due both to long headers
| and long URLs?
|
| Talk about being hoisted on your own petard...
| samstave wrote:
| https://i.imgur.com/tAAuIv7.jpg
| peder wrote:
| I've written a number of front-end projects that used URLs for
| state, and yes, lol, IE was a hard no for such efforts.
| Black101 wrote:
| Mods complain about people making comments that are "obvious" but
| they don't complain about URL hiding services?
|
| Here is an example: https://news.ycombinator.com/item?id=27122041
| NaturalPhallacy wrote:
| https://youtu.be/gocwRvLhDf8?t=114
| bmh100 wrote:
| Slightly off topic, but does anyone know of a good, self-hosted
| URL shortener?
| qshaman wrote:
| I would love to have a longer url.
| Jorge1o1 wrote:
| Was posted on Hacker News:
|
| https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
| piemadd wrote:
| oh wow thanks!
| joeblau wrote:
| I don't know why but just seeing this title made spontaneously
| start laughing.
| hansor wrote:
| Same here. Amazing artistic stuff.
| [deleted]
| chadlavi wrote:
| "So that's what things would be like if I'd invented the thing
| longer. Oh, a man can dream though."
| trevor-e wrote:
| lol neat project, this would get bonus points from me if it made
| them look like Amazon product URLs :)
| engineer_22 wrote:
| The author is a highschool student
___________________________________________________________________
(page generated 2021-05-14 23:00 UTC)