How do I solve old content displayed in browser?

Get help using Construct 2

Post » Tue Jun 23, 2015 9:40 pm

I know this was mentioned somewhere else on the forum, but I cannot find it anymore.

Whenever I change content, for example an image (sprite), my Chrome browser keeps showing the old content, unless I go into incognito mode. Even after reloading.

Is there a way to solve this?
For example: on start of layout: clear browser cache. (but not the whole browser, of that poor user that came across my HTML 5 game ^^)
Or something like this? :)
B
28
S
6
G
7
Posts: 681
Reputation: 5,682

Post » Tue Jun 23, 2015 9:57 pm

Try refreshing the page with ctrl + F5 -- this should reload the page while ignoring cache.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,126

Post » Wed Jun 24, 2015 11:04 am

hello linkman2004! I have tried that and while I might solve this with some shortcut combination for my own browser, what about the unknowing visitors?

What if I upload a new picture on my html5 site and old visitors see the old picture and would not know they are seeing old content.
B
28
S
6
G
7
Posts: 681
Reputation: 5,682

Post » Wed Jun 24, 2015 9:54 pm

A website explained the following:

The cache manifest file is a simple text file that lists the resources the browser should cache for offline access.
Referencing a manifest file
To enable the application cache for an app, include the manifest attribute on the document's html tag:
<html manifest="example.appcache">
...
</html>
The manifest attribute should be included on every page of your web application that you want cached. The browser does not cache a page if it does not contain the manifest attribute (unless it is explicitly listed in the manifest file itself. This means that any page the user navigates to that includes a manifest will be implicitly added to the application cache. Thus, there's no need to list every page in your manifest. If a page points to a manifest, there's no way to prevent this page being cached.


So I should perhaps remove this, manifest-part out of the index.html site?
Is there already an option in C2 that can do this for me?
B
28
S
6
G
7
Posts: 681
Reputation: 5,682

Post » Fri Jun 26, 2015 7:48 am

Although I cannot test it out right now, this tutorial from Ashley answers my question. Case closed. ^_^
https://www.scirra.com/tutorials/70/off ... onstruct-2
B
28
S
6
G
7
Posts: 681
Reputation: 5,682


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests