Ask HN: What is the purpose of Airbnb's meta content JSON?

https://news.ycombinator.com/item?id=9700308
by cstrasen • 11 years ago
3 2 11 years ago

A colleague of mine noticed the way they provide key-value pairs (most likely also for their https://github.com/airbnb/polyglot.js) but oddly doing so via "<meta content=". There is also application settings in there. I wonder what the reason might be. JS variables is what I would have expected.

some examples:

  https://gist.github.com/christophstrasen/9c13e1a94c0aff25844e (settings)
  https://gist.github.com/christophstrasen/f7ae6424089001aecdc8 (locale)
  https://gist.github.com/christophstrasen/847d13719bf557a6b823 (translation)
Ideas:
  - More comfortable to access via the DOM?
  - SEO (but why config settings?)
  - Caching

Related Stories

Loading related stories...

Source preview

news.ycombinator.com