does not use any build tools, backend language
pure HTML page, how to update users automatically after each update upload
1: manually stamp?
does not use any build tools, backend language
pure HTML page, how to update users automatically after each update upload
1: manually stamp?
I have had this idea before. If you want to add a timestamp to pure html, you can only dynamically load files through javascript, for example (the following syntax is incorrect, but it is rare to think about it, just refer to it)
append('<link rel="stylesheet" href="a.css?_='+ (+new Date()) +'">')
the first thing I need to say before answering this question is the HTML page. Why is it that after each update upload, the user visits why it is not your latest upload
because the browser has a caching mechanism, the css,js and other css,js of the page will be cached automatically after the first browse
so the solutions to this problem are as follows (there should be a lot of ways, and these are the two that come to mind at present)
<META HTTP-EQUIV="pragma" CONTENT="no-cache"><!-- -->
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"><!-- -->
<META HTTP-EQUIV="expires" CONTENT="0"><!-- ; -->
<script type=" text/javascript" src=" /js/test.js?+Math.random()"></script>
it's best to use a build tool, which is more convenient, or backstage. Pure html can only load css,js dynamically, load css and js, in js and add a timeline as the logo!
< script type= "text/javascript" >
$.getScript ("test.js?v=" + Math.random (), function () {
)$.getScript("test2.js?v="+Math.random());
});
< / script >
the method currently adopted by the subject
Previous: How do you solve some doubts about restful?
Next: After js new image caches the picture, the value is assigned to the dom element and loaded again?
I got a set of data, which is to choose the type of question. How can I tell if I have chosen the right one answera: "Olympic Games " answerb: "Asian Games " answerc: "Paralympic Games " answerd: "University Games " id: "1772 " question: "f...
what is the current level of support for vw,vh layouts in mobile browsers? ...
modify the markdown file under the ant-design-pro-site site and use the relative path to introduce the picture in the markdowm file. attachment: the picture was originally introduced using the http path. <img src=". images 1.jpg" > ...
Icon shows the red part. Choose how to write the effect in css ....
how to make the content of table not be centered vertically? you can set valign= "top " in html, then how to set it in element The table is centered vertically when it is stretched out, and the working hours are aligned with the one at 8 o clock . ...
error WARNING in configuration The mode option has not been set. Set mode option to development or production to enable defaults for this environment. WARNING in asset size limit: The following asset(s) exceed the recommended size limi...
now you need to make a front-end page for ipad pro2. Ui gave the design drawing 2732 to 2048. Should my page be set to the same size ?...
A static page is written on the computer, and the text and pictures are displayed vaguely under chrome. I can t bear to look directly at it, but it s okay to display it under Firefox. It is no problem for chrome to open other pages, just write this pag...
A rookie at the front end, get the UI picture and do the website. The following CSS Rem 12pxterCSS Rem 14pxtransCSS Rem 14px; , how on earth should I choose? my current understanding: `CSS Rem 12px;` width= 40rem; `CSS Rem 16px;` width= 30rem; ...
I haven t done it. I want to know what the train of thought is . Does first store each section structure as a string, then scroll to the specified location, and execute the following code? is similar to paging loading, but the content and layout of ...
<tr v-for="item in tableData"> <td :class="same">{{item.td}}< td> < tr> computed:{ same(){ let arr = ???.push( c ); return{ red: arr == [ a , c ] } } } here? It should be the dat...
in using ant design mobile, you need to use the kind of Select component in antd, but it is not in ant design mobile. What should I do ...
$("-sharpadd_link").click(function(){ var link_html = "<div class= "linkAll_inn ">" + "<div class= "activity_theme ">" + ...
The problem with is roughly as follows: there is a list page with a title bar in the middle. When I pull up a certain distance, the title bar is fixed and suspended at the top, and when pulled down a certain distance, it is put back to its original pos...
the question is as perplexed as the title. Design website, using personalized fonts, such as: the following three fonts, so download online, import locally. ...
company website, pure static text, would like to ask how to quickly achieve a Chinese-English switching function? some methods have been tried so far, such as method 1: translate the whole document directly with Microsoft js file , but this metho...
how is the style of CAPTCHA realized? how to find the principle! question: is there an input for each number? Find the solution ...
means that the width on the right side of the div is fixed, pull the left border, and the width shrinks from left to right div1,div2. div2div1div2 tablediv ...
< html lang= "en " > < head > <meta charset="UTF-8"> <title>Document< title> <script type="text javascript" src="vue.js">< script> <script type="text javascript" src="vue...
A question I was asked by the back end a few days ago, because the background page is compatible with ie8, it should be carried out under ie. gives iframe a move-out event, which is triggered as soon as the mouse moves over the scroll bar when the mouse...