Changes are not reflected [closed]

0

I have a strange problem since a few days ago I have saved the changes on a Hostinger server, both CSS and Javascript at the beginning when the changes were not reflected instead of removing the browser cache. What I was doing was entering directly into the address of the file (Example: miweb.com/css/estilo.css ) and inside the file updated with F5 now something super weird happens to me, not only do I not see the changes reflected but when I enter directly to the address and update it still does not show what I have changed , even when I enter directly from the file manager of the server itself and when I am going to edit the file IF the line that I have changed is displayed.

I've already tried removing the cache and tried different browsers

    
asked by Victor Laya 16.10.2018 в 19:52
source

2 answers

0

When this happens, it may be due to server-side caching handling issues. That is, it is the server that has that file loaded in memory to reduce the processing time it takes to read the file on the disk. This is what they do, for example content distribution networks (CDN). You should check the server settings and file cache policies, to clean the memory and re-read the file on the disk.

    
answered by 16.10.2018 / 19:59
source
1

Niche's explanation is correct to me:

  

When this happens, it may be because of management issues   server side cache. That is, it is the server that has   loaded that file into memory to reduce processing time   it takes to read the file on the disk. This is what they do,   example, content distribution networks (CDN).   English). You should review the server configuration and policies   file cache, so that it cleans the memory and re-read the   disk file.

In my case I do not have access to change server settings and I constantly change the script.

If you use php add this to your page for each script, so you make sure the server reloads the file and ignores everything after ? When you call your file, it only includes the normal name "miscript.js".

   int v = Random.Next();
   echo "<script src='miscript.js?'" + v + "></script>";

Greetings.

    
answered by 16.10.2018 в 20:29