When JavaScript is inside external .js file it’s cached on the browser.
Is it possible to do the same with JS inside tags on HTML page?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No.
Alright a little insight of what you’re asking for.
Imagine the script tag’s content is cached. What would be the name of it? How the browser would identify? Alright somehow it manages to do that. But then comes the real question:
What would you benefit from that? You have no access to the browser’s cache so you need to send the same inline script tag with every request as it can be in the cache or not.
To sum up, it is: