Question

I have uploaded the file.css file on server with filezilla and also with cpanel. But when i browse the website the css has no impact.

I changed: padding-left: 10px; If i see the Page view source i see that the older file is there.

What can be the reason for that ?

Was it helpful?

Solution

Try doing a hard refresh. CTRL Shift R. That should force any cached files to clear. Chances are that's the problem, unless the file isn't uploading. If you see the new file listed in Filezilla then it's a cache issue.

OTHER TIPS

Have you checked the permission for css files?

It should be 644 for all files, and 755 for all folders.

Did you replace/overwrite the existing css file? It sounds like maybe the old one wasn't overwritten - in which case you'll have to do that for the changes to take effect.

Are you using a CMS? Some of them have Cache features where it may take time for those changes to be reflected unless you hard refresh.

http://httpd.apache.org/docs/2.2/programs/htcacheclean.html

If you are using apache2 this is amazing, use the "-i" option, the reason the files dont update is because they are cached, if you cant do this you can always change the href="styles.css" into href="styles.css?v=version2" it makes the server think that there is a new file, so then it updates the cache

I changed the name of the .css file, deleted the old one from the server, reuploaded and directed the html to that newly named and uploaded css file. Worked like a charm for some reason.

First try to clear the cache. If nothing happens then link your CSS like this:

<link rel="stylesheet" type="text/css" href="style.css?v=0.001">

It should help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top