init post js best practices