Questions tagged [browser-cache]

Browser caches are an instance of the optimization mechanism known as a cache.

Browser caches are an instance of the optimization mechanism known as a cache.

The browser cache is nothing more than a place on your hard disk where the browser keeps things that it downloaded in case they're needed again.

For example, the first time you visit a web page, the browser will download some files like the logo image or icon images, so that it can be shown.

Since it's faster to get something to display from your hard disk than it is to get it from the internet, every time thereafter when you visit the same web page or any page on that domain, the browser will be searching for the required images and other files on its cache folder. Only if not found it goes to the internet to download them.

2884 questions
1
vote
1 answer

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…
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
1
vote
2 answers

How to save scripts, images and css files into browser cache?

I have been trying to enable Caching for my web-page. I find-out so much post related to Caching static file in browser cache, but i did't get success. I try for both server side or client side code for it: SERVER SIDE I tried to put code for…
Ishan Jain
  • 8,063
  • 9
  • 48
  • 75
1
vote
1 answer

How to reload properly a webapp cached files?

I can't update my Sencha Touch webapp without having to clear the browser cache to make the new version work. If I don't clear the cache manually, I get this error : Error evaluating http://localhost/alpha1/app.js with message: SyntaxError:…
Cherif
  • 5,223
  • 8
  • 33
  • 54
1
vote
1 answer

Where to set no-cache header - in pageload or page init (in .net)

I have web page that uses no-cache mechanism for not to let browser to cache content. However, I have some doubts. The developer has inserted no cache code into the PageLoad method in MasterPage. It is like this (on Page Load in Master Page) …
renathy
  • 5,125
  • 20
  • 85
  • 149
1
vote
1 answer

Strange behavior with multiple ajax requests to the same URL

I constructed a strange situation in a CherryPy server, and I'd like some help understanding exactly what's happening, and why. Here is server.py: import cherrypy import os import threading class Root(object): def __init__(self): …
Roni Choudhury
  • 486
  • 4
  • 15
1
vote
1 answer

How to clear cache and cookies of the browser when the browser is closed?

I am using asp.net and I am using session cookies. When I debug in the browser for the first time then it works fine. When in give a feedback and close the browser. And again I open the browser and again I want to give a feedback then it does not…
Iswar
  • 2,211
  • 11
  • 40
  • 65
1
vote
4 answers

How do I prevent TWebBrowser from keeping copies of pages in the cache?

I am using the TWebBrowser component with Delphi 7. With the TWebBrowser I am retrieving my own HTML files placed on my server. I do not want copies of the HTML files to be easily found by the user. Currently, all of the files retrieved via the…
user1527613
  • 1,100
  • 4
  • 12
  • 29
1
vote
0 answers

Chrome not using cached files when page is refreshed

I have a page with some script files embedded. All of these script files are served with appropriate caching headers including cache-control: private, pragma: private, expires: one month from now... When I navigate to a page and then select the…
Jon
  • 1,224
  • 2
  • 14
  • 23
1
vote
0 answers

leverage browser caching and .htaccess file

Where i will find the .htaccess file in tomcat(on windows) in order to leverage browser caching? Many blog posts says it will be in root directory of your web application. For example if my application is named as myapp then .htaccess file should…
a Learner
  • 4,944
  • 10
  • 53
  • 89
1
vote
2 answers

Web browser cache clean while javascript development

I am developing javascript code with visual studio. Everything is working wWhen I run the application first, then I changing some value of javascript variable but browser not showing right result. The old result is appearing. var…
barteloma
  • 6,403
  • 14
  • 79
  • 173
1
vote
0 answers

How to vary browser cache by file type in IIS

Does anyone know how I can declare different values for the browser cache duration in IIS (or web.config) depending on file type? I would like to (browser) cache my images for a month because they are not going to change, but (browser) cache my css…
Craig
  • 849
  • 8
  • 21
1
vote
0 answers

If an image/file is changed, does the header expire?

This is probably a dumb question but I couldn't find an answer anywhere. I recently added mod_deflate and cache control to my htaccess: Header set Cache-Control "max-age=604800" My question was,…
Callombert
  • 1,099
  • 14
  • 38
1
vote
1 answer

Cache-Control: public,max-age=LONG_TIME response does not work behind HTTP 301 redirect

My server is hosting an application which preloads >100 thumbnail images on each page load. The thumbnail images do not change often. I am trying to make consecutive thumbnail loads faster by using Cache-Control: public,max-age=MANY_SECONDS where…
joar
  • 15,077
  • 1
  • 29
  • 54
1
vote
1 answer

How should http cache actually work?

I know this is actually a old thing but I really got questions about this and how it was supposed to work when it started. So I got at least these four important cache headers I can send back to the client (Last-Modified, Cache-Control, Expires and…
noob
  • 8,982
  • 4
  • 37
  • 65
1
vote
1 answer

To avoid cache control in firefox

When the response header is Cache-Control : no-store Firefox stores in memory cache device. If the response header is Cache-Control : no-cache then firefox stores in disk cache device. If the response header is Cache-Control : no-store,…
Suresh
  • 1,063
  • 1
  • 11
  • 16