I know little bit knowlege of lightning components. I am new to Lightning locker service. What is the difference between lightning with locker service and without locker service? how to know it is using with locker service or not in lightning components. Could you please anybody reply on this post.
Locker service enforces some of the java-script security best practices and also helps component isolation by ensuring they are not able to see and edit each others attributes both in same and different namespace.
Locker uses browser CSP (Content Security Policy) to prevent a web page against cross-site scripting (XSS), clickjacking and other code injection attacks resulting from execution of malicious content in the trusted web page context.
From documentation below
Locker Service is a powerful security architecture for Lightning components. Locker Service enhances security by isolating Lightning components in their own namespace. Locker Service also promotes best practices that improve the supportability of your code by only allowing access to supported APIs and eliminating access to non-published framework internals.
how to know it is using with locker service or not in lightning components
Any new component created now in your salesforce org will be with version 43 and any lightning component create with Api version 40 and higher will have locker service enabled.
Locker Service is meant to improve security but also stability by reducing the likelihood of conflict with other people's code.