A
A
Alexander2018-02-14 13:02:04
PHP
Alexander, 2018-02-14 13:02:04

How not to load a page from the cache?

I made a small site with instructions for work. Not cms, the usual raw layout. There is a list of instructions, for example 10 points. When I add the 11th item (I just write with notepad++), this 11th instruction can only be seen after ctrl+F5, otherwise there will be 10, day after day, the 11th item will not appear. Googling, I tried to change the name of the style file, (not updated), then stuck Last-Modified, and still the result = 0. Tell me how to make the page load from the server, and not from the cache, if I changed something on it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Zhivagin, 2018-02-14
@Krasnodar_etc

Add a number after the file name in the connection string ?v=1
When updating, change the number
Example
<link src="style.css?v=1"></link>

O
Oleg, 2018-02-14
@402d

Last-Modified to html text? it's like a header in general. I suppose that you still have the
Expiried header sent to the server, for example, a year ahead.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question