Extra Form
PHP PHP 7.2
CMS XpressEngine

테스트를 좀 하다가 이상한 것을 발견했습니다.

 

min.js 의 경우 브라우저캐시가 서버정책에 맞지 않게 ttl이 0으로 잡히는 듯 합니다.

 

코어에서 강제하는 부분이 있나요??

 

주로 common 에 있는 스크립트들인데요. 물론 다른 서드파티의 경우도 그렇습니다. 

 

  • profile
    css/js 파일등 모든 리소스 파일은 XE를 거치지 않습니다. 따라서 코어에서 강제로 ttl을 바꿀수 없습니다.
  • profile profile
    그럼 서버를 확인해야겠군요.
  • profile ?
    코어를 통한다고 하긴 좀 애매하지만
    어딘가에 포함된 htaccess 파일을 통해서 바뀌는것도 가능할텐데요..
  • profile profile
    nginx 설정 손 봐주고 정상화 되었습니다. 감사합니다.
  • profile ?
    혹시 어떤 부분이 문제셨나용??
  • ? profile
    location 블럭에 사용된 정규식 순서 때문에 min.js에는 적용되지 않고 있었어요. nginx가 설정 순서에 무척 민감합니다 ㅜㅜ
  • profile ?
    기진곰님 서버 세팅 의뢰해서 기진곰님이 설정해주신 세팅인데

    min.js파일이 캐시가 안되네요

    location /files {
    expires 95d;
    log_not_found off;
    }

    include snippets/block-bots.conf;
    include snippets/block-other.conf;
    include snippets/well-known.conf;
    include snippets/xe-rewrite.conf;

    location ~ \.php$ {
    fastcgi_pass unix:/run/php-fpm/clubsound.sock;
    include snippets/fastcgi-php.conf;
    #limit_req zone=antiddos burst=10 nodelay;
    }

    location ~* \.(jpe?g|png|gif|bmp|ico|svg|woff|ttf|s?css|less|js)$ {
    expires 95d;
    log_not_found off;
    }

    location ~* \.(mp[34]|wav|flv|avi|m4a|ogg|flac|mov|MOV)$ {
    expires 95d;
    log_not_found off;
    #limit_conn addrconn 3;
    limit_rate_after 500k;
    limit_rate 10m;
    }
  • ? profile
    네, 라이믹스용 rewrite 규칙을 초창기에 적용해 드린 서버라면 순서 때문에 min.js 파일 캐싱이 되지 않을 수 있습니다.