Correct way of loading Jquery


I am a bit confused with many forum posts I read about this.

I need to do some ajax stuff and I realised that jquery isnt registered and

therefore not included in the response.


is suggested as an easy way of including it.

I presumed that necessary js files will be included.

But when I include this into my view

I get an error stating that

webroot/assets/59a54d10/jquery.js is not found.

I copied jquery files from framework/web/js/ to that asset folder

and renamed some then ajax started to work.

I see that this is not the correct way.

Could you please explain what I should do?

What should I do if I want to use js files included in the framework and not?