문제

I just occured a very strange problem. When I edit my stylesheet and save it (with ftp filezilla) and I refresh the page with Ctrl-f5, there are no changes in the style.

When I make a new stylesheet and copy the code from the 'not working' stylesheet into there and save with the new name it works. but when I edit that stylesheet, the same problem appears.

I really don't know what te problem is.

I use

  • Notepad++
  • filezilla FTP client
  • Chrome webbrowser
도움이 되었습니까?

해결책

This is probably a common caching problem. One way to solve it is by adding a version parameter to the stylesheet’s URL:

<link rel="stylesheet" href="//www.example.com/css/style.css?v=1.1" type="text/css" media="all">

Just increment the version number (the v param in the URL), this will force the browser to download the file as it will be considered "new"/different.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top