browser-cache

FF3 redirects from remote IP to localhost after form submission

I'm accessing another computer on the network, using the local ip (eg. 10.1.1.59:8080). Login page loads nicely but after form submission firefox (3) redirects to localhost instead of remote IP. IE6/7/8 give no problems so it seems to be a firefox problem. Any ideas? ...

How can I request that browsers always update (a.k.a. never cache) certain page elements, such as CSS sheets?

I've noticed an issue while developing my pages that's always bothered me: while Firefox (my general "dev" browser) always updates CSS and images when they change on the server, Internet Explorer does not always do this. Usually, I need to refresh the page in IE before it will ask the server for updated versions of things. As I understa...

How to control CSS cache?

Hi, I asked a question on http://stackoverflow.com/questions/1614429/what-is-style-cssver1-tag. I learned that developers use style.css?ver=1 to let browsers read updated css, but W.Craig Trader pointed out that is is not good. My question is, what is the best way to force a browser to read updated css without style.css?Ver=1 format? ...

How to invalidate cache when the page is modified via Ajax?

I have a page that has some editable features that are updated via Ajax when they are edited. There are some values that are stored in a cookie so that they can be loaded when the page is loaded. If the user makes a change, then goes to a different page and clicks the back button to return, the original page is loaded from cache withou...

Programmatically reset browser cache in Ruby (or remove select item from browser cache)?

I would like to create a rake task or something to clear the browser cache. The issue is, I am running a Flash app, and if I change the data, I more often than not need to reset the browser cache so it removes the old swf and can see the new xml data. How do you reset the browser cache with ruby? Or even more precisely, how can I only...

How do you test user agent/web browser caching?

When you explicitly set the cache request and response directives via setting response and request headers, is there a better way to test if they are working correctly for UAs other than manually looking in their cache? On a related note, am I right in assuming browsers get the current time for cache operations from the computer's syste...

Manually Caching SWF/SWC in the Browser - Mimic Adobe's Signed SWZ?

Hey, I would like to take advantage of Adobe's Runtime Shared Library system for swc's, but I'm not sure how it ACTUALLY works, like the programming behind it. I understand that it allows you to load SWCs at runtime, but how does it do that? I'm asking because I would like to try to mimic something like the Signed RSL "swz" system Ado...

Checking if Browser is using Cached SWC/SWF?

How do you know if the browser is actually using the cached swf RSL/library for Flex projects? I would like to be able to do different things from the preloader based on whether or not the user has never downloaded the library vs. they have it already cached by their browser. Is this possible? ...

Browser cache behaviour for redirects

I'm trying to figure out if redirecting all www.example.com requests to example.com will be beneficial for caching or not, to which end I have 2 questions. SEO is not an issue here. If the browser requests an image from the www URL (#1) and gets HTTP redirected to the www-less version (#2), will it store the result as cache value for j...

Stop browser from filling textboxes with details

Hi, I've run into a really annoying problem, and I'm hoping it's just a setting I've missed. I've got an ASP.NET application which allows users to enter their username/password in various places (e.g. login, change password, change username etc..). When I logged in, the browser asked if I would like to store the user details. Usually, ...

How does this ajax call persist DOM changes in the browser cache?

For the purpose of the question I need to create a simple fictitious scenario. I have the following trivial page with one link, call it page A: <a class="red-anchor" onclick="change_color(event);" href="http://mysite.com/b/"&gt;B&lt;/a&gt; With the associated Javascript function: function change_color(e) { var event = e || window....

Make page to tell browser not to cache/preserve input values

Most browser cache form input values. So when user refreshes page, the inputs have same values. Here's my problem. When user clicks Save, server validates POSTed data (e.g. checked products), and if not valid, sends it back to browser. However, as stated above, even if server clears selection for some values, they may still be selected ...

How does SO's form remember previous input values?

I've noticed that the Title or Body part is remembered if I come back to the Ask Question page by pressing Back button of my browser. This feature is available in all browsers I tested, but doesn't exist for the forms in my own projects. How can I approach that effect? UPDATE I still don't have any clue yet,but guess it that some kin...

Explanation for expires header

I have a joomla application working on Apache.To improve site performace we have written a .htaccess file to root of the application with setting a far future expires header to all the static content. As desired first time the files load in fresh with 200 status code. when again click on the same link many of the files are served directl...

Prevent IE caching

I am developing a Java EE web application using Struts. The problem is with Internet Explorer caching. If an user logs out he can access some pages because they are cached and no request is made. If I hit refresh it works fine. Also if an user goes to login page again it won't redirect him because that page is also cached. Two solutions...

How to clear browser cache when re-uploading image with same filename, in php?

I have a listing of items, that also contains an image thumbnail. Sometimes I need to change the thumbnail image, but keep the filename the same. Is there a way to force the browser to download the newly uploaded image, instead of grabbing one from the browser cache? This is very pertinent when people update their avatars, which causes ...

Ruby on Rails: how to set content expiration for 15 minutes if it is an AJAX request

Is the following a good form of detecting AJAX request and setting expiration for 15 minutes so that the same GET will not require any network traffic? # in controller if request.xhr? response.headers['Expires'] = (Time.now + 15.minutes).httpdate response.headers['Cache-Control'] = '' # override any no-cache, must-revalidate end ...

Balancing browser caching of images and time expiration of links to avoid bandwidth theft

We host our images on Amazon S3, and serve them through Amazon Cloudfront. We'd like to reduce our bandwidth expenses. We believe that we have quite a bit of bandwidth theft, and want to start using signed URLs to prevent this. However, we have to balance this against the fact that each time we send out a new signed url, it invalidate...

Will caching work if one of the web servers has a clock that is slightly off?

It is said that the web servers' clocks must be identical for the Expires and Cache-Control headers to work? Why is that? Can't they be off by 1 second or a few minutes? If the cache is supposed to be good for 1 year, then won't a time difference of a few minutes or even a few hours not matter on one or some of the web servers? In ht...

Browser Cache: If we change something force user to get new version, not local cached version

We make changes often on our website (which uses caching) and sometimes user don't know to refresh a page in order to get the newest copy of it. If we do update a page, how can we force the users browser to know that there is a new server version, and to use that rather than their browsers cached page? ...