5

Take a look at the script they use for their widgets:

http://platform.linkedin.com/in.js

You see a cache-control with a very high number (right now: Cache-Control:max-age=29326).

So what happens if they screw up with a release, and everyone is stuck with a broken script file for 20 days?

ps, this is the widget code they use:

<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/MemberProfile" data-id="https://www.linkedin.com/in/dirkboer" data-format="inline"></script>
Dirk Boer
  • 8,522
  • 13
  • 63
  • 111
  • Ok, how is this opinion based? :/ recently I stopped wondering how Quora got so big in such a short time – Dirk Boer Dec 03 '14 at 09:39
  • To whoever voted to close this as "primarily opinion based", please explain your reasoning. This is not opinion based at all. +1 – Scimonster Dec 03 '14 at 09:39
  • 2
    that's a nice question. note that `window.location.reload(true)` with javascript should trigger a "hard reload" and should re-fetch the cached files (`true` argument is for hard-reload). it's possible that they can detect errors in a cached file, and in such case, trigger the `window.location.reload(true)`. another option is that in case of js error, they dynamically insert the following meta tag: `` – geevee Dec 03 '14 at 09:41
  • Interesting. You would expect this only works with real script errors. There are tons of ways to screw up a deployment without causing errors, just really really unwanted behaviour :) – Dirk Boer Dec 03 '14 at 09:46

1 Answers1

-1

Seems they rely on the Expires header

curl -I http://platform.linkedin.com/in.js
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
P3P: CP="CAO CUR ADM DEV PSA PSD OUR"
Content-Type: text/javascript;charset=UTF-8
X-Li-Fabric: prod-ltx1
X-Li-Pop: PROD-ELA4
X-LI-UUID: yyhFixwfrBPwlh3UwCoAAA==
Cache-Control: max-age=21268
**Expires: Wed, 03 Dec 2014 17:44:09 GMT**
Date: Wed, 03 Dec 2014 11:49:41 GMT
Connection: keep-alive
X-CDN: AKAM
Marcel Dumont
  • 1,217
  • 1
  • 11
  • 17
  • http://stackoverflow.com/questions/7549177/expires-vs-max-age-which-one-takes-priority-if-both-are-declared-in-a-http-resp - "the max-age directive overrides the Expires header, even if the Expires header is more restrictive" – Joe Jan 26 '15 at 06:45