3 ms·
Steve Souders blogged about how to serve scripts with far future expires without updating the client's script tag [1]. This technique initially loads the (poten
by moonboots 14y ago
Steve Souders blogged about how to serve scripts with far future expires without updating the client's script tag [1]. This technique initially loads the (potentially stale) js from the client's cache and checks for updates in the background, updating the client's cache if a new version is detected.
[1] http://www.stevesouders.com/blog/2012/05/22/self-updating-scripts/ http://www.stevesouders.com/blog/2012/05/22/self-updating-sc...
- jconley 14y agoYes, this is a great approach for javascript code. Usually, like in this case, there is something that will be faster than a round trip to check for if-modified-since or the ETag, which I would assume is used to do the invalidation in this case. Of course, YMMV, and if fastly is close enough to the edge and there aren't very many requests, this kind of optimization won't be required. There might also be an opportunity to modify what is served from the customer's sites, depending on how all that is architected.