| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| computer:web [2019-02-05 03:55] – [Beispiele] skrupellos | computer:web [2019-02-09 08:58] (current) – removed skrupellos |
|---|
| ====== Modern Web ====== | |
| ===== Pre* ===== | |
| ^ Doc ^ Type ^ Example ^ Comment ^ | |
| | [[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control#Forcing_lookup_of_specific_hostnames|1]] | DNS Record | ''%%<link rel="dns-prefetch" href="//example.com">%%'' | | | |
| | [[https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types|1]] | TCP Connection | ''%%<link rel="preconnect" href="//example.com">%%'' | | | |
| | [[https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ|1]] | Resource | ''%%<link rel="prefetch" href="//example.com/resource.png">%%'' | Nidrigere Prio als ''preload'' -> \\ Nur für Resourcen auf der "nächsten" Seite | | |
| | [[https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content|1]] | Resource | ''%%<link rel="preload" href="//example.com/resource.png" as="image">%%'' | Höhere Prio als ''prefetch'' -> \\ Auch für Resourcen auf der aktuellen Seite | | |
| | [[https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types|1]] | Site | ''%%<link rel="prerender" href="//example.com/site/">%%'' | | | |
| |
| ===== Metadata ===== | |
| ==== Beispiele ==== | |
| ^ Site ^ ''<title>'' ^ ''<h1>'' ^ ''twitter:title'' ^ ''og:title'' ^ ''description'' ^ ''og:description'' ^ ''twitter:description'' ^ | |
| | [[https://en.wikipedia.org/wiki/Random_variable|Wikipedia]] | %%<Title> - Wikipedia%% | %%<Title>%% | | | | | | | |
| | [[https://ebay.us/wWgf3M|eBay]] | %%<Title> | eBay%% | //(Unsichtbar: "Details zu ")//%% <Title>%% | %%<Title>%% | %%<Title> | eBay%% | %%<Title> | <Cat> | eBay!%% | %%<Title> | <Cat> | eBay!%% | %%<Title> | <Cat> | eBay!%% | | |
| | [[https://stackoverflow.com/q/1740341|Stack Overflow]] | <Cat> - <Title> - Stack Overflow | <Title> | <Title> | <Title> | <Start of Q>...<End of Q> | <Start of Q>...<End of Q> | | | |
| | [[https://www.amazon.com/dp/1539836835|Amazon]] | <Title>: <Author>: <ID>: Amazon.com: <Cat> | <Title> - <Type> - <Date> | | |
| |
| ===== Cache ===== | |
| <WRAP center round important 60%> | |
| Dieser Abschnitt ist noch hochgradig Falsch! | |
| </WRAP> | |
| |
| * public proxy (shared cache) vs private browser cache | |
| * Neu Laden vs validieren | |
| |
| ^ ''Cache-Control'' vom Server ^ Für ^ Funktion ^ Typ ^ | |
| | ''%%must-revalidate%%'' | Private / Public | Abgelaufen -> validieren | Re{validate,loading} | | |
| | ''%%no-cache%%'' | | Immer -> validieren | Cachability | | |
| | ''%%no-store%%'' | | Gar nie nicht speichern | Other | | |
| | ''%%no-transform%%'' | | Gecachten content nicht verändern (z.B. Optimieren) | Other | | |
| | ''%%public%%'' | | | Cachability | | |
| | ''%%private%%'' | Public | | Cachability | | |
| | ''%%proxy-revalidate%%'' | Public | Abgelaufen -> validieren | Re{validate,loading} | | |
| | ''%%max-age=<seconds>%%'' | Private / Public | Relative Cache Zeit | Expiration | | |
| | ''%%s-maxage=<seconds>%%'' | Public | Relative Cache Zeit (vorrang vor ''Expires'' und ''s-maxage'') | Expiration | | |
| | ''%%immutable%%'' | | Nicht abgelaufen -> verwenden (auch bei F5, aber nicht bei Shift+F5) / Abgelaufen ->Nicht verwenden [[http://bitsup.blogspot.com/2016/05/cache-control-immutable.html|1]] | Re{validate,loading} | | |
| |
| * https://tools.ietf.org/html/rfc7234 | |
| * https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching | |
| * Schöner Entscheidungsbaum: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=de | |
| * https://www.slideshare.net/martinmartin7777/http-caching-basics-66553113 | |
| * https://www.keycdn.com/blog/http-cache-headers | |
| * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control | |