16

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?

5
  • 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.) Commented Nov 23, 2016 at 10:48
  • 1
    You can use the new "Disable Javascript" option in the Command window. See Kayce's answer here: stackoverflow.com/a/40727332/1814840 Commented Nov 23, 2016 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. Commented Nov 23, 2016 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. Commented Nov 23, 2016 at 10:58
  • Possible duplicate of How to disable JavaScript in chrome developer tools Commented Mar 29, 2018 at 8:05

1 Answer 1

11

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.