Jump to content

Image updated via Backoffice not Visible in Frontend


Razan_OG

Recommended Posts

When I update a category image via the back office, it doesn’t appear updated on the same PC I used for the update. However, if I check on a different device, the update is visible. I suspect it's a caching issue. I tried clearing the cache via the back office, but it didn’t work. Then, I manually deleted cache files, but the problem persisted. Any ideas? A fix would be appreciated. I also tried a hard refresh (Ctrl + Shift + R), but that didn’t help.

Link to comment
Share on other sites

It's not the Prestashop cache issue but rather it's the browsing cache issue.

It might be due to the expiration time set on the static content. Sometimes, it might be due to some 3rd party module that modifies the htaccess to enable the static content expiry. It might also be due to automatic cache expiry enabled from the server end or Cloudflare (if using the same).

Need to disable the same if using any one of them but from the performance perspective, it's not suggested to disable it. 

 

 

 

Link to comment
Share on other sites

  On 2/21/2025 at 7:30 AM, Knowband Plugins said:

It's not the Prestashop cache issue but rather it's the browsing cache issue.

It might be due to the expiration time set on the static content. Sometimes, it might be due to some 3rd party module that modifies the htaccess to enable the static content expiry. It might also be due to automatic cache expiry enabled from the server end or Cloudflare (if using the same).

Need to disable the same if using any one of them but from the performance perspective, it's not suggested to disable it. 

 

 

 

Expand  

Ohh yeah it browser cache and when i deleted media cache from browser it worked but it anonying to me to do that everytime need to find a better solution

  • Like 1
Link to comment
Share on other sites

Yon can try adding the below lines at the top of the .htaccess file (Root folder htaccess file).

 

<IfModule mod_expires.c>
    ExpiresActive Off
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(html|htm|js|css|json|xml|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|otf|eot|mp4|webm|ogg|mp3|wav|zip|rar)$">
        Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
        Header set Pragma "no-cache"
        Header set Expires "Thu, 01 Jan 1970 00:00:00 GMT"
    </FilesMatch>
</IfModule>

 

It will disable browse caching for static content. 

----------

Another way will be theme editing and adding some dynamic parameters in the URL to make it unique every time. 

 

Link to comment
Share on other sites

  On 2/21/2025 at 12:48 PM, Knowband Plugins said:

Yon can try adding the below lines at the top of the .htaccess file (Root folder htaccess file).

 

<IfModule mod_expires.c>
    ExpiresActive Off
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(html|htm|js|css|json|xml|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|otf|eot|mp4|webm|ogg|mp3|wav|zip|rar)$">
        Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
        Header set Pragma "no-cache"
        Header set Expires "Thu, 01 Jan 1970 00:00:00 GMT"
    </FilesMatch>
</IfModule>

 

It will disable browse caching for static content. 

----------

Another way will be theme editing and adding some dynamic parameters in the URL to make it unique every time. 

 

Expand  

thanks buddy i will give try

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...