Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

18 characters for URLs is far too short. #51

Closed
Timmmm opened this issue Oct 8, 2014 · 3 comments
Closed

18 characters for URLs is far too short. #51

Timmmm opened this issue Oct 8, 2014 · 3 comments

Comments

@Timmmm
Copy link

Timmmm commented Oct 8, 2014

Problem

The hard-coded list of TLDs cannot be relied upon (.co.uk? not even .net made the list). So we can say that you have 17 characters after the http(s)://. Here are some URLs that would not fit.

Also, why did you not include the trailing / in the TLD replacements? That would save an extra character.

Solution

A simple solution is simply to send several advertisment packets, each containing a part of the URL. A simple scheme could be that the first 4 bits indicate the number of fragments, and the second 4 bits indicate the current fragment number. This would allow very long URLs at a slight battery cost.

Consecutive packets would not be sent immediately after each other, as Android has issues with this (woo quality BLE code right guys?; ok to be fair the BLE spec is stupid about that.). Instead they would be sent evenly spaced through the advertisment period. E.g. if you currently send a <17 byte URL once per second, you'd split a longer URL into 2 and send alternate packets every 0.5 seconds.

@asifmallik
Copy link

Another solution could be using URL shorteners to keep the length of URLs below 17 characters.

@ghost
Copy link

ghost commented Oct 8, 2014

For reference, see issues #23, #27, and #52.

@scottjenson
Copy link
Contributor

Thanks @jcrabtr

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants