{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreia2pwo7js7i5wuv6do2r2piurfzs5zvlsteahefk2fsedrvuv3ng4",
"uri": "at://did:plc:npotif2ojsuxqvoyx43i44wl/app.bsky.feed.post/3mmkbi6y3u3mv"
},
"description": "Når en bruker WP Super Cache så vil ikke nødvendigvis HTTP-felt taes vare på. Kanskje spesielt viktig hvis en ønsker å styre Cache-Control ved hjelp av f.eks. innstikksmodulen Cache-Control. Når en da kjører f.eks.: % curl --compressed -sD - -Lo /dev/null \"https://aslakr.folk.ntnu.no/2024/01/wp-super-cache-pa-nfs/ Så vil en før WSC (WP Super Cache) slår inn få følgende: HTTP/1.1...",
"path": "/2024/01/hindre-wp-super-cache-a-endre-http-felt/",
"publishedAt": "2024-01-09T14:11:30.000Z",
"site": "at://did:plc:npotif2ojsuxqvoyx43i44wl/site.standard.publication/3mmgrlz7roef5",
"tags": [
"HTTP",
"WordPress",
"WP Super Cache",
"web"
],
"textContent": "Når en bruker WP Super Cache så vil ikke nødvendigvis HTTP-felt taes vare på. Kanskje spesielt viktig hvis en ønsker å styre Cache-Control ved hjelp av f.eks. innstikksmodulen Cache-Control. Når en da kjører f.eks.: % curl --compressed -sD - -Lo /dev/null \"https://aslakr.folk.ntnu.no/2024/01/wp-super-cache-pa-nfs/Code language: Shell Session (shell) Så vil en før WSC (WP Super Cache) slår inn få følgende: HTTP/1.1 200 OK Date: Tue, 09 Jan 2024 10:44:25 GMT Server: Apache/2.4.52 (Ubuntu) Strict-Transport-Security: max-age=63072000 Vary: Accept-Encoding,Cookie X-Pingback: https://aslakr.folk.ntnu.no/xmlrpc.php Link: <https://aslakr.folk.ntnu.no/wp-json/friends/v1>; rel=\"friends-base-url\" Cache-Control: max-age=600, stale-while-revalidate=6000 Link: <https://aslakr.folk.ntnu.no/wp-json/webmention/1.0/endpoint>; rel=\"webmention\" Link: <https://aslakr.folk.ntnu.no/wp-json/webmention/1.0/endpoint>; rel=\"http://webmention.org/\" Link: <https://aslakr.folk.ntnu.no/wp-json/>; rel=\"https://api.w.org/\" Link: <https://aslakr.folk.ntnu.no/wp-json/wp/v2/posts/5407>; rel=\"alternate\"; type=\"application/json\" Link: <https://aslakr.folk.ntnu.no/b/1W7>; rel=shortlink Content-Encoding: gzip Content-Length: 13858 Content-Type: text/html; charset=UTF-8 Code language: HTTP (http) Når WSC har gjort jobben sin vil web-tjeneren svare: HTTP/1.1 200 OK Date: Tue, 09 Jan 2024 10:44:37 GMT Server: Apache/2.4.52 (Ubuntu) Strict-Transport-Security: max-age=63072000 Vary: Accept-Encoding,Cookie Cache-Control: max-age=3, must-revalidate Last-Modified: Tue, 09 Jan 2024 10:44:26 GMT Content-Encoding: gzip Content-Length: 13858 Content-Type: text/html; charset=UTF-8 Code language: HTTP (http) En mangler da diverse Link-felt og får en Cache-Control som er satt noe kort av WSC. For å omgå dette kan en slå på: Cache HTTP headers with page content. (eller sette wpsc_save_headers i wp-cache-config.php til 1). En skal da få noe slikt som dette: HTTP/1.1 200 OK Date: Tue, 09 Jan 2024 10:45:11 GMT Server: Apache/2.4.52 (Ubuntu) Strict-Transport-Security: max-age=63072000 Vary: Accept-Encoding,Cookie X-Pingback: https://aslakr.folk.ntnu.no/xmlrpc.php Link: <https://aslakr.folk.ntnu.no/wp-json/friends/v1>; rel=\"friends-base-url\", <https://aslakr.folk.ntnu.no/wp-json/webmention/1.0/endpoint>; rel=\"webmention\", <https://aslakr.folk.ntnu.no/wp-json/webmention/1.0/endpoint>; rel=\"http://webmention.org/\", <https://aslakr.folk.ntnu.no/wp-json/>; rel=\"https://api.w.org/\", <https://aslakr.folk.ntnu.no/wp-json/wp/v2/posts/5407>; rel=\"alternate\"; type=\"application/json\", <https://aslakr.folk.ntnu.no/b/1W7>; rel=shortlink Cache-Control: max-age=600, stale-while-revalidate=6000 Content-Encoding: gzip Content-Length: 13849 Content-Type: text/html; charset=UTF-8 Code language: HTTP (http)",
"title": "Hindre WP Super Cache å endre HTTP-felt",
"updatedAt": "2024-01-09T14:23:46.000Z"
}