Menu

#687 4k cookie limit for table coords, 2k url limit for permalink

Git
open
nobody
None
5
2019-07-21
2019-07-19
No

Currently the schema view stores the coords of manual positioned tables in a cookie in the web browser.

This has following disadvantages:

  • web browsers configured to clean all their history data when browser is closed for privacy reasons loose the coords cookie.

  • There is a 4k cookie limit. So with assuming average 40 byte per table name and coord for instance you reach the limit with a database around >100 tables. magento has >300 tables, openbravo >500, so this limit is reached quick even if table names are shorter.

  • The permalink feature has also its limitation: There is a 2k URL length limit in browsers, so encoding the positions in a bookmark is even more limited.

Solutions:

  • To mitigate just the 4k cookie limit, IndexedDB of web browser can be used to store bigger structured data in the browser.

  • Use also the approach that phpmyadmin's Designer uses. In case of adminer, a sqlite database could be used for that purpose. Requires adminer handles multiple connections well. (one for that internal sqlite db, and one or more connections to other supported databases)

  • Using a sqlite db on server for that purpose solves the 2k permalink limit as there can be a diagram_id referenced by the url instead of the coords.
1 Attachments

Discussion

  • Jakub Vrána

    Jakub Vrána - 2019-07-19

    The cookie should be valid for 30 days.

    Adminer is not going to use an SQLite database for its storage but the IndexedDB idea is worth pursuing.

     
  • Peter Liscovius

    Peter Liscovius - 2019-07-19

    Maybe I can add it as an independent plugin..?

    In addition to client side storage

    • Cookie
    • IndexedDB

    I could imagine:

    • plugin using a sqlite db (as stated before in this ticket)
    • plugin using existing phpmyadmin's PMA tables for existing mysql projects that yet have phpmyadmin designer layout(s).
    • plugin using a url for loading existing layout(s)
     
    • Jakub Vrána

      Jakub Vrána - 2019-07-21

      Yeah, plugins are fine. I'll happily link them from https://www.adminer.org/plugins/. If IndexedDB is reasonably supported in browsers, it could also be a storage used by Adminer itself (with a fallback to cookie).

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.