Home > Backend Development > PHP Tutorial > In the linux+nginx+php environment, the html file uses link to introduce the css file, and the css file is modified, and the page style remains unchanged.

In the linux+nginx+php environment, the html file uses link to introduce the css file, and the css file is modified, and the page style remains unchanged.

WBOY
Release: 2023-03-01 16:08:02
Original
1659 people have browsed it

I would like to ask if this is a problem with the nginx configuration. I use the link tag in the html file to import the css file. Except for the first time it works, every time I modify the css file in the future, the page style does not change

Reply content:

I would like to ask if this is a problem with the nginx configuration. I use the link tag in the html file to import the css file. Except for the first time it works, every time I modify the css file in the future, the page style does not change

Is it a cache problem? . . For example, clear the browser cache, or open the css link to force a refresh. . .

Try restarting the service. . . .

I am used to modifying the css and then taking some time to refine it after introducing the css

Add the version number after the css file, such as test.css?v1.1

Caching problem, try changing the css name

It should indeed be a caching problem. Timestamps are indeed very convenient during debugging, but they are not advisable during operation. It is recommended to use timestamps during debugging and adopt a fixed version system after going online

1: Update cache
2: Check path

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template