Cache Control

Mrdwxll0

Member
Nov 15, 2018
469
51
0
මචන්, අපිට Browser එකක cache control කරන්න පුලුවන්ද...?
සාමාන්‍යයෙන් අපිට වෙබ්සයිට් එකක image, javascript, CSS වගේ files cache විදියට වැඩි කාලයක් තියාගන්න පුලුවන්නම් අපිට data සැලකියයුතු ප්‍රමාණයක් save කරගන්න පුළුවන් නේද...?

Extension එකකින් website වල HTTP Headers edit කරලා හෝ browser (Chrome, Firefox, Opera, etc) එකෙන් force කරලා මොකක්හරි විදියකින් මේක කරන්න විදියක් නැද්ද...?

Code:
Cache-Control: public, max-age=31536000
 

imhotep

Well-known member
  • Mar 29, 2017
    14,823
    8
    35,324
    113
    මචන්, අපිට Browser එකක cache control කරන්න පුලුවන්ද...?
    සාමාන්‍යයෙන් අපිට වෙබ්සයිට් එකක image, javascript, CSS වගේ files cache විදියට වැඩි කාලයක් තියාගන්න පුලුවන්නම් අපිට data සැලකියයුතු ප්‍රමාණයක් save කරගන්න පුළුවන් නේද...?

    Extension එකකින් website වල HTTP Headers edit කරලා හෝ browser (Chrome, Firefox, Opera, etc) එකෙන් force කරලා මොකක්හරි විදියකින් මේක කරන්න විදියක් නැද්ද...?

    Code:
    Cache-Control: public, max-age=31536000

    The above is for one year...The recommended max-age is that. I think it's stated in RFC 2616.
     

    Mrdwxll0

    Member
    Nov 15, 2018
    469
    51
    0
    The above is for one year...The recommended max-age is that. I think it's stated in RFC 2616.

    Yes. It's for one year. Is it the recommended time..?
    I don't think most websites used that.

    Google: private, s-maxage=0, max-age=0, must-revalidate
    Facebook: private, no-cache, no-store, must-revalidate
    Twitter: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
    Reddit: private, s-maxage=0, max-age=0, must-revalidate
    YouTube: no-cache
    Elakiri: private
    Apple.com: max-age=300
     

    imhotep

    Well-known member
  • Mar 29, 2017
    14,823
    8
    35,324
    113
    Yes. It's for one year. Is it the recommended time..?
    I don't think most websites used that.

    Google: private, s-maxage=0, max-age=0, must-revalidate
    Facebook: private, no-cache, no-store, must-revalidate
    Twitter: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
    Reddit: private, s-maxage=0, max-age=0, must-revalidate
    YouTube: no-cache
    Elakiri: private
    Apple.com: max-age=300

    Soryry, I cannot give you a definitive answer.. Never noticed it . The RFC 2616 was superseded by RFC 7234. Maybe there's a reason in there.
     

    Malinga

    Well-known member
  • Jul 20, 2006
    61,301
    1,013
    113
    එහෙම කරන එක තේරුමක් නෑ. ඒ සයිට්වලට අදාල ඇසෙට්ස් නිරන්තර අප්ඩේට් වෙන නිසා තමයි ඒ වගේ කාලයන් දීල තියෙන්නෙ.
     

    Mrdwxll0

    Member
    Nov 15, 2018
    469
    51
    0
    Soryry, I cannot give you a definitive answer.. Never noticed it . The RFC 2616 was superseded by RFC 7234. Maybe there's a reason in there.

    Thanks for the reply. I don't know much about the RFC, brother.

    machine eka slow wenane brouwser speed wadi unata

    Therune naha machan. :oo:


    Thanks.

    එහෙම කරන එක තේරුමක් නෑ. ඒ සයිට්වලට අදාල ඇසෙට්ස් නිරන්තර අප්ඩේට් වෙන නිසා තමයි ඒ වගේ කාලයන් දීල තියෙන්නෙ.

    Ow eka aththa.
    Mama okata samana deyak Firefox eke karala baluwa.
    Loku wenasak thiyanawa bn.
    Elakiri eke thiyana image thread load wena speed eka hugak wadiyi.