JaeYeopHan / tip-archive

📦 Archiving various development tips. If you watch this repository, you can get issues related to the newly registered development tip from the GitHub feed.
https://www.facebook.com/Jbee.dev/
245 stars 8 forks source link

caching 에 대한 것들 #48

Open JaeYeopHan opened 5 years ago

JaeYeopHan commented 5 years ago

Description

index.html

<!— kill cache —>
<meta http-equiv=“pragma” content=“no-cache” />
<meta http-equiv=“Cache-Control” content=“no-cache, no-store, must-revalidate”>
<meta http-equiv=“Expires” content=“0”>

Nginx

# For Product Root Point
location / {
    # kill cache
    add_header Last-Modified $date_gmt;
    add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
    add_header Pragma "no-cache";
    if_modified_since off;
    expires off;
    etag off;

    root /home1/irteam/projects/Invest-JP/dist;
    try_files $uri $uri/ /index.html;
}

Reference