By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Dynamically changing browser settings

P: 7
Dynamically changing browser settings

Browser have various settings like - cookies, cache, etc...

How to check a browser whether cookies is Enabled OR Disabled in the client machine using JavaScript

Note:-
please don't tell -- Tools--> Internet option-->etc...
Sep 16 '08 #1
Share this Question
Share on Google+
3 Replies


Atli
Expert 5K+
P: 5,058
Hi.

You could of course simply try to use whatever you need tested. See if it actually works.

Like with Cookies. Try creating a cookie and then see if the cookie was actually set.

There are also some navigator properties you can try.
Like:
Expand|Select|Wrap|Line Numbers
  1. navigator.cookieEnabled
Although I'm not sure about how well different browsers support this.
Sep 16 '08 #2

gits
Expert Mod 5K+
P: 5,390
the most browser-settings can just be read ... so that you could code according to them ... but you cannot set and should not be able to set them. of course you could set the window-size, what is quite annoying, or some other not security relevant properties ... but whenever you want to set a more sensible property you will not be allowed or at least the user is asked by the browser if he will grant your script the permission to do so - so that you even couldn't rely on this, since the user could deny it ...

to check for cookies ... just follow Atli's suggestions ...

kind regards
Sep 16 '08 #3

P: 7
Hi.

You could of course simply try to use whatever you need tested. See if it actually works.

Like with Cookies. Try creating a cookie and then see if the cookie was actually set.

There are also some navigator properties you can try.
Like:
Expand|Select|Wrap|Line Numbers
  1. navigator.cookieEnabled
Although I'm not sure about how well different browsers support this.

thank you for your answer & reply.
Sep 19 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.