Jon
Jon

Reputation: 301

how to code for users with disabled cookies and popups

Here's the situation: I'm redesigning our company's public facing website using ASP.NET, VB.NET and some javascript/jquery. Some of the features I'm adding require page reloads (which register as popups) and cookies. Works great if everything is enabled. But I've noticed on some browsers (such as Firefox) I still get prompted to ok these actions, retain these cookies, etc. Now I can code some contingencies for simpler pages for users who will not or can not enable these features, but I'd like to find a way to make it as simple as possible to enable the full features. From what I've read, there's no way I can actually force it to happen the way you can force a browsers document mode by settings in the web.config file, but I am hoping there is some way to give them a button to click (or something similar) where it will enable what I need. Is there a way to do this programmatically? what I'm looking for is some code that will make the changes, instead of directing them to go into e.g. Internet Explorer security settings, which most end users find tedious if not incomprehensible.

Advice?

Upvotes: 0

Views: 1471

Answers (3)

mason
mason

Reputation: 32694

You can avoid using cookies. Use Session or a database backend for things you would normally use cookies for. For popups, use overlaid divs such as Ajax Control Toolkit Modal Popup Extender or jQuery UI Dialog instead of starting a new browser window.

But really, ASP.NET is designed to function with cookies. If you're users aren't using them, tell them they're penalizing themselves.

Upvotes: 1

Win
Win

Reputation: 62260

JavaScript cannot change a client browser's setting due to security reason. Otherwise, all hell will break loose.

Note: you can if you create an executable program, and a user runs on his/her computer.

However, you should never change a user's browser setting.

Instead you should give the warning and instruction to a user which is a proper way of doing it.

Disable Javascript

enter image description here

Disable Cookie

enter image description here

Upvotes: 0

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114347

Certain browser features are ONLY user-configurable for security reasons. You cannot provide a button to change these settings because they would then not user-configurable.

All you can do is warn the user.

Upvotes: 0

Related Questions