Browser caching for SVG files in nginx Ubuntu 16.04


(Aakib) #1

Jumedeen sir * Browser caching for SVG files
LEMP stack me kaise karte hain? Iske liye guide kar do aap please?


(Jumedeen khan) #2

Add this in server block on nginx configuration file.

location ~*  \.(css|js|ico|jpg|jpeg|png|gif|svg|woff|woff2|ttf|eot)$ {
expires max;
log_not_found off;
}

Baki aur kisi format ko cache karna hai to wo bhi isme add kar lena.


(Aakib) #3

Thank you sir


(Aakib) #4

Sir ye file me.kis jagah add karne se achha rahega. Ya kahin bhi add kar sakte hain.


(Jumedeen khan) #5

server block me


(Aakib) #6

Sir ye svg wala code maine laga diya hai nginx ko bhi reload kar diya hai. Lekin iska pata kaise lagaye ki ye kam kar raha hai ya nahi.
Maine HTTP/2 enable kiya hai.
Gzip compression bhi enable kar liya hai. Site ki speed to badh gayi hai chalne me lekin
Pingdom me load time 3 second hai abhi bhi.
Genesis framework + magazine pro theme hai.
Iske baad kya karun