Best way to check that javascript/cookies are enabled

I have a site, based on wordpress, bootstrap, and jQuery that is completely reliant on both JavaScript and cookies.

What is the best way to warn the user that the site won't work properly if it detects either are these are not functional
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris StanyonWebDevCommented:
A simple HTML <noscript> tag

<noscript>Your browser does not support JavaScript!</noscript>

Open in new window

MarkProgrammerAuthor Commented:
I've heard this effects SEO depending on it's position. Also, this does not solve cookies being disabled.
Chris StanyonWebDevCommented:
Like anything in your page, it can affect SEO if you use it wrong. Used correctly, it won't. The idea being that if you wrap a lot of your site's content in a <noscript> tag, then it probably won't be picked up, which could harm your SEO. If you're using it to tell a user that javascript is not turned on, then you'll be fine.

As for cookies, probably the easiest way is to actually use Javascript:

var cookiesEnables = navigator.cookieEnabled; // returns trur or false

Open in new window

Obviously this won't work if Javascript is turned off, but then neither will your site, so it's not a problem.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MarkProgrammerAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.