Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

per-session cookies

Status
Not open for further replies.

anuprm

Programmer
Nov 20, 2003
11
IN
Hi All,

Is there any way to check if per-session cookies(not stored) is enabled in the browser using javascript? And also how do u check if Javascript is enabled in the browser?

Thanks in Advance.

Bye
 
Don't know about the cookies... but detecting JS is easy.

Have a "plain HTML" page, with code like this at the top:

Code:
<html>
<head>
<script type=&quot;text/javascript&quot;>document.location = 'jsFile.html';</script>
</head>

Then, if the user has JS enabled, they will be forwarded to the page 'jsFile.html', where you can do all your JavaScript stuff.

If they don't get forwarded, then you know they have it disabled, and thus your &quot;plain HTML&quot; page will stay onscreen.

Hope this helps,

Dan


 
Thanks Billy...but I really need to know if per-session cookies are enabled or not in the browser.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top