简体   繁体   中英

When I change code, save and it, and test it on my browser, it still runs the old code, why?

I am using html5 and javascript on Mac OSX Lion. My text editor is text mate, though it is out of date. So I tried saving it in text editor. Ran it and it still executed old code that I had deleted and saved. Does someone have an idea what the error might be? Thanks.

--Udate-- Figured it out: Thanks to everyone for the speedy answer! Turns out I had to close the browser after emptying the cache for it to take affect. I did a few closing and opening tests, and essentially if I just refresh the page, it accomplishes the same as emptying the cache. What I was doing was just closing after I clicked my html and saw what it did, then reopen it. But yea, emptying the cache worked. Thanks again!

Your browser is cacheing the old files. Turn off the cache in your browser!

使用Ctrl + Shift + Delete键删除浏览器缓存,然后刷新页面

It probably has to do with that the browser caches your page. Make sure that the cache is cleared when deploying new content.

How to quickly clear cache is different in each browser so google how you easy can invalidate the cache in your browser of choice.

执行ctrl-F5键以获取页面的未缓存版本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM