Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I have javascript disable guideline page in my website which describes how to enable javascript in browser. when user go to site main page and if javascript is disabled in browser then it will redirect to javascript disable guideline page.

I am checking JS disable in browser like below code:

<noscript>
<meta http-equiv="refresh" content="1;URL=errjscript.aspx" />
</noscript>

but when I open my site and if JS is disabled in browser then it is not redirecting to javascript disable guideline page. I debug it but every time it is reloading main page.

In my all other sites, I have same code and it is working fine.

further I change my web.config. I commented below code in it.

<authentication mode="Forms">
<forms loginUrl="Default.aspx" timeout="600" protection="All"/>


then it works properly in local but not working on live server and giving 401 error.

Thanks.
Posted
Comments
Nathan Minier 7-Nov-14 7:03am    
Do you have <!DOCTYPE html> for HTML5 and are you using an HTML5 compliant browser?
Sinisa Hajnal 7-Nov-14 8:50am    
Why not put whole instructions in <noscript> so that user is not redirected? Or some short text with a link...

1 solution

The ideal way to do this should be showing the guideline message or something just inside the noscript tags.

401 error comes for unauthorised access. So, I suspect the guideline file you are trying to redirect to is not permitted to be accessed by the application or user.
 
Share this answer
 
Comments
kk2014 10-Nov-14 0:21am    
I have found something new in my web.config file. Ì have allow users="*" and deny users="?" in it.
is it causing some issue?
and how can we write content in noscript tag instead redirecting to guideline page.
Just write in plain text inside noscript tags. That would do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900