0

To what extent are jQuery / JavaScript functions stored in memory?

  • Once the browser has parsed the page, does it go into memory? All of it? If functions are repeatedly called, are they always from memory?
  • If the portion of memory allocated to scripts is filled (thinking Internet Explorer 6 on a horrible PC here), what happens? (Other than a slow browser...)
  • Is there a way of seeing how much memory is used by a variable or a function as a whole?
2
  • 1
    "Browser caching" does not refer to active usage of scripts. It refers to storing the script file on the local filesystem temporarily so that subsequent page requests don't need to be sent over HTTP. Commented Oct 10, 2011 at 16:14
  • Title changed, thanks. Are you able to help enlighten me though? Commented Oct 13, 2011 at 12:16

1 Answer 1

1

As per my knowledge, once JavaScript code has been parsed by the browser, objects remain in the memory unless dereferenced and garbage collected. Garbage collection is dependent on the JavaScript implementation of the browser though.

You can see the memory usage by JavaScript objects easily in Chrome. See here.

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.