Open in app
Kesk -*-
1K Followers
About

Sign in

1K Followers
About
Open in app
but when I wirite js in html,it can also be cached?Can u give a counterargument~?
1

狗子

Kesk -*-

Kesk -*-

Apr 1, 2020·1 min read

The code is cached if you cache the entire Html page. Html pages are usually dynamic nowadays and therefore not possible to cache without sacrificing functionality. So, you usually need to place js code in external files which then can be cached using HTTP cache headers.

Written by

Kesk -*-

Software engineer - software Enthusiast - Sci-Fi writer.

More from Kesk -*-

Software engineer - software Enthusiast - Sci-Fi writer.

More From Medium

My Favorite Programming Quotes

Kesk -*- in JavaScript In Plain English

11 Tricky JavaScript Questions

Kesk -*- in JavaScript In Plain English

9 Modern && Practical JavaScript Code Snippets

Kesk -*- in JavaScript In Plain English

13 Concepts/Tips You Should Know in JavaScript

Kesk -*- in JavaScript In Plain English

12 Super Useful Tricks in JavaScript

Kesk -*- in JavaScript In Plain English

“Hello, World!” in Different Programming Languages and Times

Kesk -*- in The Startup

From TypeScript to WebAssembly in few steps

Kesk -*- in JavaScript In Plain English

10 New JavaScript Native Array Methods

Kesk -*- in JavaScript In Plain English

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store