Web cache | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Web cache

Hello I used external css and images on a web page When I change the image and css file because it is cached in the user's browser New images and styles do not change I wanted to know how to reduce the time of this change and apply the changes on the web page as soon as possible

11th Dec 2020, 9:29 AM
Alireza Hadizadeh
Alireza Hadizadeh - avatar
2 Answers
+ 2
Alireza Hadizadeh You can do versioning of your included files so that everytime browser will get as a new URL. You can simply add ?v=1.0 after the included files. <link href = "/abc.css?v=1.0" type = "text/css" rel = "stylesheet"/>
11th Dec 2020, 9:38 AM
A͢J
A͢J - avatar
+ 1
Thank you .
11th Dec 2020, 9:40 AM
Alireza Hadizadeh
Alireza Hadizadeh - avatar