Chrome, as well as a number of extensions enable you to disable javascript so on your page, but all of them force some type of reload to the page.
I am trying to diagnose a poor scrolling performance issue. I would like to have JS enabled while the content loads and initiates, and then disable it altogether, to check whether the issue is script-based or it's just the heavy page content that's causing the issue.
Is there any way to do this?
You can use the Devtools Command menu to "Disable Javascript" and "Enable Javascript". This was demonstrated recently by Kayce's answer to How to disable javascript in chrome developer tools.
Related
I am not able to enable javascript in Chrome. Under Chrome javascript setting the default option for "sites can use javascript" is grayed out. Even if I add website manually under "Allowed to use javascript" the website is not loading, screenshot below.
This happened while I was trying to find a solution for another issue and followed solution from this page (the top answer), so I went to Chrome Devtools > Sources and clicked on the pause button since then the javascript has got disabled. Paused in debugger in chrome?
Note: Javascript is working fine in other Chrome Profiles. The issue is with this particular Chrome Profile.
Try right-clicking the "Sites can use Javascript" option, and inspect element:
Then, remove the disabled or disabled="" attribute from whatever element the console brings you to.
The option should be enabled. Click it and try reloading your site again.
If this doesn't work, you can try reporting any problems for whatever chrome has (I use Mozilla Firefox and I know they have a help center).
Or try re-installing the browser, because some files may be corrupt (don't worry, if you have an account you can sign-in after the reinstallation and everything should be synced).
I'm trying to debug a CMS-backed website (Drupal 7). It is displaying some problems due to conflicting Javascript. For a fraction of a second, the site components are fine, and then *SNAP*, they're broken. It must brake as soon as the conflicting resource loads.
Using Chrome's developer tools (or Safari, Firefox... even IE's), is there a way to load the page, one Javascript resource at a time? This way I can see exactly which resource loads when the page issues appear.
(I'm also open to better ways of debugging this kind of thing.)
You can use the Pause on exceptions feature of DevTools, in Sources Tab, it is the hexagonal pause button at the far right.
While testing no-js fallbacks on my site in Chrome 37.0, I open up Developer Tools, hit the Settings icon and check "Disable Javascript". But then when I refresh to see my no-js site, "Disable Javascript" becomes unchecked and my scripts still run. (Changing chrome://settings/ still works, though.)
Has anyone else seen this issue? Is it a bug with 37.0?
How do I fix this?
While I haven't found any references to this being a documented bug (not everybody seems to be experiencing this, but several folks have on various versions), I have found a good enough fix:
Open your page using incognito mode (Ctrl+Shift+N) and "Disable Javascript" should work correctly.
I am facing some problems in my web application I have some hidden fields, when I press f12 it will open developer tools and hidden fields are visible there, so I disabled the f12 using some javascript code snippet. But in IE if ithe javascript is not enabled then again same issue will happen.
So is there any way to enable the javascript in IE without manual settings(any programmatic way)?
You cannot enable JavaScript in any browser programmatically. That would be just stupid thing to exist.
Think about you browsing to some malicious site filled with harmful JavaScript - even though you have set your JavaScript off in your browser to prevent the harmful scripts, the malicious site could programmatically enable it again.
No thats not possible but
you could load your form-fields with some ajax
so if theres no js, the form fields are simply not there.
But that also means, that if theres no js, you dont have your correct form.
And do you really only want ie-f12-users not to see your form-fields ? what if someone uses firefox or chrome inspectors ... or just opens the source-code ? i dont get it
I have a Javascript image switcher on my products page. It working perfect in IE and Firefox but both Safari and Chrome fails to load the script on some pageloads. A refresh seems to fix it but when changing product page or language it crashes.
The product page
Im using Wordpress and the script is varal.org/media/imageswitcher/
Thanks!
Anton
I did not experience any issues in either Chrome or Safari for Windows on your product page. Try this in Chrome, to check if the two scripts (imageswitcherconf.js and imageswitcher.js) are being loaded:
Press Ctrl+Shift+J to open the JavaScript Console/Developer Tools window.
Click the Resources tab on the top of the window.
Enable resource tracking/script debugging if you have to.
With the JavaScript Console/Developer Tools window still open, perform an operation that would normally trigger a crash, such as switching languages.
On the left side of the window, under the Resources heading, you should see imageswitcherconf.js followed by imageswitcher.js. (For me, they appeared fourth and fifth in the list, respectively.)
If the files aren't being loaded:
Are you behind a caching proxy?
Is your browser cache clear?