Chrome needs CTRL-F5 now and then

Posted on 2013-11-15
Last Modified: 2013-11-18
I'm making a website solution with HTML5 and JSON. Now and then Chrome seems to get the cache mixed up resulting in very strange behavior. With a CTRL-F5, everything works again. What can I do to avoid having to do CTRL-F5 now and then?
Question by:mdoland
  • 3
  • 2
LVL 19

Expert Comment

ID: 39651031
Your web page should be set to expire sooner or even immediately.

Author Comment

ID: 39651035
Ok, that sounds intresting. How do I do that?
LVL 82

Accepted Solution

leakim971 earned 500 total points
ID: 39651044
add a random parameter to your Ajax url.
var random = new Date().getTime();
var myUrl = "/path/to/my/json.php?random=" + random;

Open in new window

or maybe you've a nocache parameter to set to true.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 39651053
How do I set the nocache parameter?
LVL 82

Expert Comment

ID: 39651060
I said << maybe >>
If you don't know, I don't know

Author Closing Comment

ID: 39656057
I got the general key to solve it.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This Micro Tutorial demonstrates how to disable your ad blocker for some sites. In case Marketers would like to see ads on a site, this allows them to possibly view their competitors without have ads run on every site they visit.
This Micro Tutorial demonstrates how to quickly find related content for YourTango's posts using MozBar Chrome extension.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question