Why does healthcare.gov use “if ('en' === 'en')“?
1–10 of 11 posts
Re: Why does healthcare.gov use “if ('en' === 'en')“?
#2I 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')“?
#3Go to healthcare.gov/es and the condition is if('es' == 'en'){}
That's all ...
Re: Why does healthcare.gov use “if ('en' === 'en')“?
#4And 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')“?
#5On 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')“?
#6that 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')“?
#7that is just their way of telling the client-side javascript about 'en' or 'es' etc . Bad design I guess.
No etc. If 'en' is not 'en' then it's assumed to be 'es_MX'
Re: Why does healthcare.gov use “if ('en' === 'en')“?
#8Go to healthcare.gov/es and the condition is if('es' == 'en'){} That's all ...
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')“?
#9The best of the terrible js code's I have ever encountered.
Re: Why does healthcare.gov use “if ('en' === 'en')“?
#10Related: hilarious geeky musings on healthcare.gov "features" http://sfy.co/tGfF