Debugging in addition to add time stamp on the URL, how to avoid JS, CSS is returned 304 state?

Source: Internet
Author: User
Tags add time fpm

In the Local development environment (NGINX), often encountered this situation: debugging JS when the browser is always not loaded with the modified JS content, and directly spit out the last cached code.I have tried the following:Ctrl+f5Ctrl+f5+f5+f5+f5+f5+f5
Service Nginx RestartService nginx stop ... service nginx start
Service php-fpm RestartService php-fpm stop ... service php-fpm start
rebootin Nginx configuration Riga expires-1;in Nginx configuration riga add_header Cache-control ' No-store ';have failed. in the Google Browser debugging mode found all JS files are clear a water 304 not Modified. Go to search engines to find a solution, and clear the answer to the water: after the URL of JS add time stamp:/static/js/common.js-/static/js/common.js?2015.03.04but in the development of debugging, you can not debug every time you have to change the URL it?  Kung Fu is not a conscientious, and finally accidentally in a foreign web site to see a netizen also encountered this problem, and ask oneself answer:added in Nginx configurationif_modified_since off;add_header last-modified ""; After restarting Nginx, you are done! PS: If not yet, remember to modify the contents of JS files, and save, and then refresh.

Debugging in addition to add time stamp on the URL, how to avoid JS, CSS is returned 304 state?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.