Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSON is the most straightforward way to add a config to a static webapp. Make it a JS file that sets window.config or something if you want comments maybe, or parse it as JS since it's trusted (if you don't trust your own site files then everything is out the window anyway).

ini, yml, etc are nice but you'd need to import a parsing library and that may be slow/overkill for a small app. xml works with xmlhttprequest though.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: