MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Cashing problem  (Mono Support )

Viewed 34661 time(s), 8 post(s) 8/16/2011 9:13:18 PMby shawndg

Related topics

shawndg

shawndg

8/16/2011 9:14:44 PM
Hello..

I have some flash and im finding it to be a pain to use in MonoX because web browser are catching the content..

I read up on how to disable catching in ASP.NET but im not sure how to apply that knowledge in MonoX since I have no
code behind page for my default.aspx file to do it...

any ideas ?

I just want to disable catching on certain web pages but if I have to do it for the whole site im ok with that too.
This content has not been rated yet. 
1871 Reputation 252 Total posts
khorvat

khorvat

8/17/2011 7:56:30 AM
Hi,

  before we go into more details on this subject can you please specify where exactly you want to disable the caching ?

I ask because I need to know what we are talking about (MonoX server side caching, MonoX client side caching, Asp.net caching etc.)

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
shawndg

shawndg

8/17/2011 10:27:45 AM
client side.
This content has not been rated yet. 
1871 Reputation 252 Total posts
denis

denis

8/17/2011 1:18:54 PM
I don't think this has anything to do with MonoX or ASP.NET caching, if you didn't change anything in the page admin - caching settings for your page, or in the Web part settings cache time, or programatically.
This is probably caused by the Flash player itself. A good old trick to get a fresh copy of the Flash movie is to append an ever-changing dummy query string to your SWF url. This will prevent caching on both proxy and client level.
This content has not been rated yet. 
7207 Reputation 956 Total posts
shawndg

shawndg

8/17/2011 2:24:18 PM
Here is a snippet i read online.. But im not sure how to apply this to MonoX.

If you write in ASP and want the same non-cache effect, here's the header information.

<% Response.CacheControl = "no-cache" %>>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

I didn't read anything about placing it a second time, but better safe than sorry.

If you're using ASP.Net, you can use the following code to achieve the same effect (and it works for IE and Firefox):

<code>// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);

// Stop Caching in Firefox
Response.Cache.SetNoStore();
</code>
This content has not been rated yet. 
1871 Reputation 252 Total posts
denis

denis

8/17/2011 2:33:04 PM
This is a standard technique to avoid client side caching that works in most scenarios (but not always). However, if we you have problems with the client side caching of Flash files, this may not work, and I still suggest the trick suggested in my previous post.
You can put this code wherever you want in your codebehind file (the best candidate would be some of your base pages), and MonoX should not interfere with it.
This content has not been rated yet. 
7207 Reputation 956 Total posts
shawndg

shawndg

8/17/2011 6:55:22 PM
Ok.. I may try that..

Now I found in MonoX under page properties catching options..
Server&Client Server only as well as number catch options.

Will this do the equiv of what the response.Catch do ?
This content has not been rated yet. 
1871 Reputation 252 Total posts
denis

denis

8/17/2011 8:05:30 PM
MonoX wraps the ASP.NET output cachine mechanism, and adds a nice GUI to administer all aspects of it. Note that there is much more to it in MonoX in  addition to output caching (MonoX can also cache individual Web parts, it adds support for other cache stores, etc).
You may want to read more about output caching here. The OutputCacheLocation parameter you are referring to can have multiple values, find more about it here. This in turn works on the Cache-Control HTTP header, which is an equivalent of the first line in the example you posted. This is the standard implementation. As always, some clients do not respect this header, so that is why pragma tag is also used in some scenarios.
In any case, you can add it to your page code programatically.
This content has not been rated yet. 
7207 Reputation 956 Total posts