11

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?

iuliu.net
  • 5,195
  • 3
  • 36
  • 63
  • I don’t think there is. (Implementing this properly would probably just be too complex. You have to decide if you want to ride the bobby car or a real automobile up front - you can’t just decide to convert one into the other on-the-fly while you are racing down the highway.) – CBroe Nov 23 '16 at 10:48
  • 1
    You can use the new "Disable Javascript" option in the Command window. See Kayce's answer here: http://stackoverflow.com/a/40727332/1814840 – Gideon Pyzer Nov 23 '16 at 10:52
  • That works, thanks. The question to that answer doesn't explicitly ask for "**no reload**" but this seems to do just that. You might as well leave it as an answer. – iuliu.net Nov 23 '16 at 10:56
  • I'd rather consider real profiling. You can start the Chrome profiler after your page has been loaded, start scrolling and stop the profiler. Additionally to just tell you that this might be coming from your script it also tells you pretty exactly which line of code causes this trouble. – mistapink Nov 23 '16 at 10:58
  • Possible duplicate of [How to disable JavaScript in chrome developer tools](https://stackoverflow.com/questions/13405383/how-to-disable-javascript-in-chrome-developer-tools) – törzsmókus Mar 29 '18 at 08:05

1 Answers1

9

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.

Community
  • 1
  • 1
Gideon Pyzer
  • 18,491
  • 7
  • 52
  • 60