admin管理员组文章数量:1287513
I'm linking bootstrap and jquery in my jade file,
link(rel='stylesheet', href='/stylesheets/bootstrap.css')
and
script(src='/javascripts/jquery-3.1.1.js')
script(src='/javascripts/bootstrap.js')
This Jade file is in my views folder. The boostrap css is in my public/stylesheets folder and the javascript is in the public/javascripts folder.
When I run my application using nodemon, it says
GET / 200 80ms - 1.65kb
GET /stylesheets/bootstrap.css 304 1ms
GET /javascripts/jquery-3.1.1.js 304 3
GET /javascripts/bootstrap.js 304 2ms
The javascript and css files do not load up.
Suggestions?
I'm linking bootstrap and jquery in my jade file,
link(rel='stylesheet', href='/stylesheets/bootstrap.css')
and
script(src='/javascripts/jquery-3.1.1.js')
script(src='/javascripts/bootstrap.js')
This Jade file is in my views folder. The boostrap css is in my public/stylesheets folder and the javascript is in the public/javascripts folder.
When I run my application using nodemon, it says
GET / 200 80ms - 1.65kb
GET /stylesheets/bootstrap.css 304 1ms
GET /javascripts/jquery-3.1.1.js 304 3
GET /javascripts/bootstrap.js 304 2ms
The javascript and css files do not load up.
Suggestions?
Share Improve this question asked Nov 14, 2016 at 6:18 Human Cyborg RelationsHuman Cyborg Relations 1,2446 gold badges27 silver badges57 bronze badges 1- 1 304 response indicates that the resource has not been modified. What is wrong with that? – saeta Commented Nov 14, 2016 at 6:28
2 Answers
Reset to default 7304 Not Modified
If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server SHOULD respond with this status code. The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields.
Server sent 304
http
status to the client (browser) to let it know the file is not modified since the browser last received the copy of the file with 200
status code. When this happens, usually browser should have cached copy
of the files and will load the same from the cache
.
Better, clear all your browser cache
by deleting all temporary files, histories etc and close and reopen (restart) your browser.
Reload the page and check the status code again in nodemon
. It should be 200
this time.
To get rid of this status pletely you can add header
res.header('Cache-Control', 'no-cache, no-store, must-revalidate')
本文标签: javascriptStatus code 304 (JadeNodeExpress)Stack Overflow
版权声明:本文标题:javascript - Status code 304 (Jade, Node, Express) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741175896a2352530.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论