Comment to 'SOLVED:Browser caching is not working properly with nginx or apache'
  • As I see now reload F5 reloads all the images with max-age=0 while in normal browsing like clicking the homepage link theΒ images are YES cached.
    So there is no problem in caching.

    I am leaving my previous answer to be a guidance for the members who have the same question.

    BalooΒ 

    -----------------------------------------------------------------------------------------------------------


    When I checked at UNA site for example this image:
    https://una.io/s/bx_timeline_photos_processed/ay4cvkatczxt52xxnuf7kafexueezwsk.jpg
    it doesn't seem like it is cached.


    And request is:
    GET /s/bx_timeline_photos_processed/ay4cvkatczxt52xxnuf7kafexueezwsk.jpg HTTP/1.1
    Host: una.io
    User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
    Accept: image/webp,*/*
    Accept-Language: tr,en-US;q=0.7,en;q=0.3
    Accept-Encoding: gzip, deflate, br
    Referer: https://una.io/
    Connection: keep-alive
    Cookie: em_cdn_uid=t%3D1559328973944%26u%3D6d12f6fdc71948ef8c0ca26e3a48b2e7; _ga=GA1.2.2132095043.1559328974; _gid=GA1.2.990492594.1559328974; em_p_uid=l:1559625371170|t:1559328984848|u:a88cf207696c475096db69c0d9616601; memberID=2159; memberPassword=c00f2e3e451b8609ede3205fb4cb67c93427c549; memberSession=tbf%2C6c.R9%3DTpah8BW%26%3FSj4bw%2CwVFDkf3
    Cache-Control: max-age=0

    Response header is:

    HTTP/1.1 200 OK
    Server: nginx
    Date: Tue, 04 Jun 2019 05:39:25 GMT
    Content-Type: image/jpeg
    Content-Length: 81877
    Connection: keep-alive
    Cache-Control: public, must-revalidate, max-age=2592000
    Accept-Ranges: 0-81877
    Content-Disposition: inline; filename="8487665900FB_IMG_1559327359772.jpg"
    Content-Range: bytes 0-81876/81877



    For a cached image like this

    https://una.io/s/sys_images_resized/rhpwgredcuaz2zmaqtxedmtwblqy4auu.png

    there is the difference where Cache-Control: max-age=0 does not exist in the request header.

    It seems like the images like above in timeline, they are not cached also here at una, what shall we do to make them cached? Because our current timeline version is causing a lot of image files to reload each time which takes a lot of time and network cost.


    πŸ’“0 πŸ˜†0 😲0 πŸ˜₯0 😠0 0
    • In Gmetrix, we get good scores except on this specific point, it's a shame.

      πŸ’“0 πŸ˜†0 😲0 πŸ˜₯0 😠0 0

    UNA - Network Infrastructure for Communities

    Close