question

Shahzaibkhan-7817 avatar image
Shahzaibkhan-7817 asked ·

how to ake sure javascript is enabled before loading the website or page?

is there any way i can disable the site to load on client pc if client has disabled javascript? my website relies too much on javascript for validations and i don't have time for now to implement server side validation which i know i should but i can't for now so i need to make sure if client has javascript disabled then don't display my site to him

windows-uwp-runtime
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NicoZhu-MSFT avatar image
NicoZhu-MSFT answered ·

hello, Welcome to Microsoft Q&A,

If you used UWP WebView control to load your website, you could make webview control disable when load the specific uri. Listen webview NavigationStarting event and get current uri, and add constraint that load a blank page.

 private async void TestWebView_NavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args)
 {
  if (args.Uri !== your uri)
     {
    
     // do some stuff.
    
     }
    
 }


2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

my site is made in asp.net mvc with razor engine view pages

0 Votes 0 · ·
NicoZhu-MSFT avatar image NicoZhu-MSFT Shahzaibkhan-7817 ·

you have no uri to access the website?

0 Votes 0 · ·