News for hackers. Stuff that matters.
Re:Why does healthcare.gov use “if ('en' === 'en')“? by spoiler on Tuesday October 22, 2013 @03:58AM (#6590360)
I reckon one of the strings is server generated. I used to do similar things when I just stared coding.
Re:Why does healthcare.gov use “if ('en' === 'en')“? by ponyous on Tuesday October 22, 2013 @04:23AM (#6590430)
On of the 'en's its generated by backend, so this is not always true as users may be from different country.
Re:Why does healthcare.gov use “if ('en' === 'en')“? by ozh on Tuesday October 22, 2013 @05:59AM (#6590737)
Related: hilarious geeky musings on healthcare.gov "features" http://sfy.co/tGfF
Re:Why does healthcare.gov use “if ('en' === 'en')“? by josh_fyi on Tuesday October 22, 2013 @04:13AM (#6590395)
And worse, that particular mess is commented out, yet downloaded to everyone's browser.

But below, in live code, they have the same thing.

Re:Why does healthcare.gov use “if ('en' === 'en')“? by manuw on Tuesday October 22, 2013 @04:07AM (#6590379)
Go to healthcare.gov/es and the condition is if('es' == 'en'){} That's all ...
Re:Why does healthcare.gov use “if ('en' === 'en')“? by bladurga on Tuesday October 22, 2013 @05:15AM (#6590596)
If I go there it takes me to cuidadodesalud.gov/es. If I go to cuidadodesalud.gov/en it takes me to cuidadodesalud.gov/es/en which gives an error 404 saying it cannot find the page 'https://cuidadodesalud.gov/es/en' in HealthCare.gov. It doesn't make much sense to redirect to a different domain name and append the '/es'
Re:Why does healthcare.gov use “if ('en' === 'en')“? by rajehssegu on Tuesday October 22, 2013 @05:21AM (#6590615)
The best of the terrible js code's I have ever encountered.
Re:Why does healthcare.gov use “if ('en' === 'en')“? by daemonk on Tuesday October 22, 2013 @07:43AM (#6591130)
Maybe its a place holder for future implementations
Re:Why does healthcare.gov use “if ('en' === 'en')“? by asadlionpk on Tuesday October 22, 2013 @04:34AM (#6590470)
that is just their way of telling the client-side javascript about 'en' or 'es' etc . Bad design I guess.
Re:Why does healthcare.gov use “if ('en' === 'en')“? by bladurga on Tuesday October 22, 2013 @05:08AM (#6590580)
No etc. If 'en' is not 'en' then it's assumed to be 'es_MX'