473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to detect if browser's cache is full

Hello,

Does anyone have any idea how Gmail does this? I have a web application

and people complain sometimes about some problems and most of the time
it turns out it's the browser's cache being full. The application
doesn't do anything really fancy and all it does is to set a cookie. I
did a search and couldn't find anything except people explainin how I
shouldn't do that. Even if the users have to add the server to the
trusted zone it's ok because it's an intranet application. btw. I'm
speaking of a MS shop, so everyone is using IE if that matters. Even if

Mozilla doesn't support that functionality or doesn't have any problems

with it - I don't care at this point because my users are using IE
99.9999% of the time and searching for bugs on places where they don't
exist is wasting my time.

Thanks,
Nick

Jun 6 '06 #1
21 2269
ns*******@gmail.com wrote:
Hello,

Does anyone have any idea how Gmail does this? I have a web application

and people complain sometimes about some problems and most of the time
it turns out it's the browser's cache being full.
What?
What on Earth makes you think that 'problems' are caused by browsers cache
that is full?
I do not believe that explanation at all.
Back up that claim with some proof.
The application doesn't do anything really fancy and all it does is to set a cookie. I
did a search and couldn't find anything except people explainin how I
shouldn't do that. Even if the users have to add the server to the
trusted zone it's ok because it's an intranet application. btw. I'm
speaking of a MS shop, so everyone is using IE if that matters. Even if

Mozilla doesn't support that functionality or doesn't have any problems

with it - I don't care at this point because my users are using IE
99.9999% of the time and searching for bugs on places where they don't
exist is wasting my time.
So why should I care and help you?
I am that 0.00001% that uses Firefox.

Like your first story: I do not believe this either.

You know-it-all attitude doesn't reflect your actual knowledge.

Regards,
Erwin Moller

Thanks,
Nick


Jun 7 '06 #2

Erwin Moller wrote:
I'm
speaking of a MS shop, so everyone is using IE if that matters. Even if

Mozilla doesn't support that functionality or doesn't have any problems

with it - I don't care at this point because my users are using IE
99.9999% of the time and searching for bugs on places where they don't
exist is wasting my time.


So why should I care and help you?
I am that 0.00001% that uses Firefox.


You're one of his users? What an amazing coincidence.

To the OP: Sorry, I don't know how to help you, but I hope someone can
without being a snob! Good luck.
-A faithful firefox users who doesn't work for you.

Jun 8 '06 #3

Jessica Parker wrote:
-A faithful firefox users who doesn't work for you.


Erg...*with* you.

Jun 8 '06 #4
Erwin Moller wrote:
ns*******@gmail.com wrote:

Hello,

Does anyone have any idea how Gmail does this? I have a web application

and people complain sometimes about some problems and most of the time
it turns out it's the browser's cache being full.

What?
What on Earth makes you think that 'problems' are caused by browsers cache
that is full?
I do not believe that explanation at all.
Back up that claim with some proof.

Interesting aside, I was unable to login to my online banking account
the other day. When I called the bank, the first thing they asked was
"are you using Firefox?", when I said yes, the response was "your cache
is full, clear the cache and restart". This cleared the problem.

Unfortunately the help desk person was unable to explain why the problem
occurs.

--
Ian Collins.
Jun 8 '06 #5

Ian Collins wrote:
Erwin Moller wrote:
ns*******@gmail.com wrote:

Hello,

Does anyone have any idea how Gmail does this? I have a web application

and people complain sometimes about some problems and most of the time
it turns out it's the browser's cache being full.

What?
What on Earth makes you think that 'problems' are caused by browsers cache
that is full?
I do not believe that explanation at all.
Back up that claim with some proof.

Interesting aside, I was unable to login to my online banking account
the other day. When I called the bank, the first thing they asked was
"are you using Firefox?", when I said yes, the response was "your cache
is full, clear the cache and restart". This cleared the problem.

Unfortunately the help desk person was unable to explain why the problem
occurs.

--
Ian Collins.


All browsers have cache...

There is a meta tag to tell the browser NOT to cache a page.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1"> (Add this second line for IE).

Not sure if this would help with the original problem, but it took me
two seconds to find on google.

Jun 12 '06 #6
Jessica Parker said the following on 6/11/2006 11:02 PM:
Ian Collins wrote:
Erwin Moller wrote:
ns*******@gmail.com wrote:
Hello,

Does anyone have any idea how Gmail does this? I have a web application

and people complain sometimes about some problems and most of the time
it turns out it's the browser's cache being full.

What?
What on Earth makes you think that 'problems' are caused by browsers cache
that is full?
I do not believe that explanation at all.
Back up that claim with some proof.

Interesting aside, I was unable to login to my online banking account
the other day. When I called the bank, the first thing they asked was
"are you using Firefox?", when I said yes, the response was "your cache
is full, clear the cache and restart". This cleared the problem.

Unfortunately the help desk person was unable to explain why the problem
occurs.

--
Ian Collins.


All browsers have cache...

There is a meta tag to tell the browser NOT to cache a page.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1"> (Add this second line for IE).

Not sure if this would help with the original problem, but it took me
two seconds to find on google.


How long did it take you to find the explanation of why those two meta
tags are useless and futile to use?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 12 '06 #7

Randy Webb wrote:
Jessica Parker said the following on 6/11/2006 11:02 PM:
Ian Collins wrote:
Erwin Moller wrote:
ns*******@gmail.com wrote:
> Hello,
>
> Does anyone have any idea how Gmail does this? I have a web application
>
> and people complain sometimes about some problems and most of the time
> it turns out it's the browser's cache being full.

What?
What on Earth makes you think that 'problems' are caused by browsers cache
that is full?
I do not believe that explanation at all.
Back up that claim with some proof.

Interesting aside, I was unable to login to my online banking account
the other day. When I called the bank, the first thing they asked was
"are you using Firefox?", when I said yes, the response was "your cache
is full, clear the cache and restart". This cleared the problem.

Unfortunately the help desk person was unable to explain why the problem
occurs.

--
Ian Collins.


All browsers have cache...

There is a meta tag to tell the browser NOT to cache a page.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1"> (Add this second line for IE).

Not sure if this would help with the original problem, but it took me
two seconds to find on google.


How long did it take you to find the explanation of why those two meta
tags are useless and futile to use?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Apparently I was wrong - the snobs are out in full blast eh?

Jun 12 '06 #8
Jessica Parker wrote:
[...]
There is a meta tag to tell the browser NOT to cache a page.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1"> (Add this second line for IE).


Apparently I was wrong -


Yes you are. And even if you were right, you forgot:

<META HTTP-EQUIV="cache-control" CONTENT="no-cache">

--
Bart

Jun 12 '06 #9
"Jessica Parker" <je******@gmail.com> wrote:
Jessica Parker said the following on 6/11/2006 11:02 PM:
All browsers have cache...

There is a meta tag to tell the browser NOT to cache a page.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1"> (Add this second line for IE).

Not sure if this would help with the original problem,
but it took me two seconds to find on google.
That's kind of a snobby statement about the amount of time
it took to find your answer. But you did bring up a good
topic. I see that your answer can't be applied for the follow-
ing reasons:
(1) It didn't answer the question of how to detect if the
cache is full.
(2) It's a server side thing to put the statements into the html
content. Furthermore, I believe it's used more as a proxy
thing, telling proxy servers how and what to cache. I believe
browsers cache everything and to prove this, browsers seem
to provide a way to to display the html content and save the
HTML content, although I've seen some fancy javascript
stuff which tries to get rid of such capabilities and some end
users frown on such tactics.

Randy Webb wrote: How long did it take you to find the explanation of why
those two meta tags are useless and futile to use?


I'm interested in hearing what others have to say about
why it's useless and what makes it useless. Am I correct
in leaning into the meta pragma cache tags as something
for proxy servers? Search engines don't seem to honor
those tags, so they don't seem to apply to search engines,
although they might provide a hint on how many times the
spiders should visit. <g>

--
Jim Carlock
Post replies to the group.
Jun 12 '06 #10
Jim Carlock said the following on 6/12/2006 7:54 PM:
Randy Webb wrote:
How long did it take you to find the explanation of why
those two meta tags are useless and futile to use?
I'm interested in hearing what others have to say about
why it's useless and what makes it useless.


The fact that it depends on a UA honoring something that it isn't
required to honor at all.
Am I correct in leaning into the meta pragma cache tags as
something for proxy servers?
Probably so, who knows. It became abused by people when they noticed
that sometimes the browser/UA would honor it and didn't care if the UA
didn't honor it. Then it became mythical to use it.
Search engines don't seem to honor those tags, so they don't seem
to apply to search engines, although they might provide a hint on
how many times the spiders should visit. <g>


My browser doesn't honor it either <g>

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 13 '06 #11
On 13/06/2006 00:54, Jim Carlock wrote:
"Jessica Parker" <je******@gmail.com> wrote:
Jessica Parker said the following on 6/11/2006 11:02 PM:
All browsers have cache...
That isn't necessarily true.
There is a meta tag to tell the browser NOT to cache a page.
A meta element may be used to suggest that a browser should not cache a
document, but caching is a HTTP mechanism and one should only expect
cache control directives to be honoured if they are sent in the response
headers (with the conditions explained in RFC 2616).
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
The Pragma header is a relic from HTTP/1.0 and applied to proxy servers.
In fact, it is a request header not a response header, therefore using
it in this way is undefined.
<META HTTP-EQUIV="Expires" CONTENT="-1"> (Add this second line for IE).

The value of an Expires header is a date, the format of which is defined
in RFC 1123 (and repeated for convenience in #2616). Though a user agent
should be prepared to handle a malformed value, nothing should ever be
written to send one: "an implementation must be conservative in its
sending behavior, and liberal in its receiving behavior."
I believe browsers cache everything [...]
They can, but a browser should honour (real) HTTP cache control
directives unless the user explicitly sets preferences to override that
behaviour. Even then, there are some directives that must always be
honoured (at least if the implementation is conditionally or
unconditionally conforming).

In any case, it is rare (but not impossible) that disabling caching is a
good solution to anything. Caching is a beneficial feature to authors,
end-users, and the Internet at large. However, one must understand how
caching works and how it can be properly controlled.

[snip]
I'm interested in hearing what others have to say about
why [meta elements are] useless and what makes it useless.


As I wrote above, caching is a feature of HTTP, not HTML. One cannot
expect /any/ user agent, especially intermediate caches, to honour a
directive that is present in markup.

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jun 13 '06 #12
JRS: In article <sB******************@text.news.blueyonder.co.uk >,
dated Tue, 13 Jun 2006 12:55:52 remote, seen in
news:comp.lang.javascript, Michael Winter <m.******@blueyonder.co.uk>
posted :

The value of an Expires header is a date, the format of which is defined
in RFC 1123 (and repeated for convenience in #2616). Though a user agent
should be prepared to handle a malformed value, nothing should ever be
written to send one: "an implementation must be conservative in its
sending behavior, and liberal in its receiving behavior."

It would be appropriate if exact ISO 8601:2004 (easily recognised) were
to be added to the set of acceptable formats for Internet use.

It would be nice if signed-integer, representing seconds since
1970-01-01 00:00:00 GMT, were also added; and possibly, for use in
limited circumstances, symbols for past, present, and future.

xxxxxxxxxxxxxxxxxxxx

Once upon a time, someone here or in the Microsoft Jscript group was
interested in generating or checking ISBN check-digits.

13-digit ISBNs are being introduced, to augment or supersede the
10-character ones.

<URL:http://www.merlyn.demon.co.uk/js-misc0.htm> now has code for
generating and checking both sizes.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jun 14 '06 #13
Guys guys, we're getting way off topic... Does anyone have any idea how
to find this in google's code? Any clue? I can't find anything
searching the net.

About expiration and meta-tags: I thought everyone stopped using these
somewhere in the past 10 years. Expiration is done through the header
and every script language has a way to set these headers (ok, there MAY
be a language out there you may find that that has no way to do it but
at least php, jsp, asp.net and asp have, so I don't care if an ancient
version of Perl on a setup on HPUX from 1985 doesn't have it, it's
irrelevant).

And still expiration doesn't help - all the pages we're talking about
are dynamic and expiring the very second they are downloaded and still
the explorer's cache is getting full. Same with GMail however it keeps
warning me about it.

Any ideas?

Jun 20 '06 #14
ns*******@gmail.com wrote:
<snip>
... Does anyone have any idea how to find this in google's
code? Any clue? I can't find anything searching the net. <snip>

You cannot have been looking very hard as a quick google groups search
turned up the one of the previously discussions on the subject, which
explains that not even google are capable of detecting when a browser's
cache is full and what they are probably doing instead.

<URL:
http://groups.google.com/group/comp....1ac46f82dfa7c9


Richard.

Jun 20 '06 #15
Hi Richard,

I found your explanation and ignored it, because what you are saying is
that what google does is impossible and misleading and I should
actually trust you and not my eyes eventhough when I see this message
when I log on to gmail then I also figure out that other sites are
suffering too. And we're not talking about downloading content that
should be already stored on the local machine - on the contrary - the
browser is showing OLD data - something stored in the cache some time
ago and not downloading anything from the server.

I was asking if someone actually heard about this technique because I
don't have the time to reverse-engineer gmail just to figure out how
they do that. I really want to be able to detect this situation and
avoid frustration. Yes we included this in the FAQ but we still get
calls from people who prefer to ask before they spend a few seconds
thinking - like most of the people posting questions on the usenet when
typing the same question in google will give you the answer in the
first 2-3 results.

Anyway thanks for your time, I hope some day I'll find the answer or
someone will point it out, until then we will live with the FAQ.

Regards,
Nikolay
Richard Cornford написа:
ns*******@gmail.com wrote:
<snip>
... Does anyone have any idea how to find this in google's
code? Any clue? I can't find anything searching the net.

<snip>

You cannot have been looking very hard as a quick google groups search
turned up the one of the previously discussions on the subject, which
explains that not even google are capable of detecting when a browser's
cache is full and what they are probably doing instead.

<URL:
http://groups.google.com/group/comp....1ac46f82dfa7c9


Richard.


Jun 20 '06 #16
ns*******@gmail.com wrote:
I found your explanation and ignored it, because what you
are saying is that what google does is impossible and
misleading
That is not what I wrote. I described how google could be setting about
gathering information that would be symptomatic of a browser's cache
being full. I also pointed out because the observable/testable symptoms
could be caused by other factors it would not be valid to conclude from
them that the browser's cache actually was full, but only that it may
appear to be. (That is the distinction between knowing what you are
doing and only writing things that 'mostly work'.)
and I should actually trust you and not my eyes eventhough
when I see this message when I log on to gmail then I also
figure out that other sites are suffering too.
So you don't see how google may observe symptoms that could be accounted
for by a full browser cache occurring when you have a full browser cache
and then make a statement that your browser cache is full and appear
correct, but may also be making that statement when other factors a
causing those symptoms and in those cases be incorrect in their claim.
And we're not talking about downloading content that
should be already stored on the local machine - on the
contrary - the browser is showing OLD data - something
stored in the cache some time ago and not downloading
anything from the server.

<snip>

Don't bet on that, google use various background loading techniques.

Richard.
Jun 20 '06 #17
So what you suggest is that I should try using some of the AJAX
techniques to download something off the server and verify if it's
content is what I expect at the current time and if not then I should
assume the cache is full, right?

Jun 21 '06 #18
ns*******@gmail.com said the following on 6/20/2006 4:22 PM:
Hi Richard,

I found your explanation and ignored it


And there is 99.99% of your problem.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 21 '06 #19
<ns*******@gmail.com> wrote:
So what you suggest is that I should try using some of the
AJAX techniques to download something off the server
and verify if it's content is what I expect at the current time
and if not then I should assume the cache is full, right?


I ran into a problem with Google last year when I turned
caching off. They presented some kind of warning and then
disabled access for a period of time. They seem to track
the downloading of the google logo and work based upon
sending the image to a client multiple times. The message
presented indicated a problem with "my" cache.

I'm only guessing about exactly what their servers track. I
really don't have a clue and I refuse to bother messing with
it. I suggest that you NOT test it yourself.

Hope this helps.

--
Jim Carlock
Post replies to the group.
Jun 22 '06 #20

Randy Webb написа:
ns*******@gmail.com said the following on 6/20/2006 4:22 PM:
Hi Richard,

I found your explanation and ignored it

And there is 99.99% of your problem.
Again... you tell me not to dig into it. You say you have no idea how
google actually do it just that it has something to do with the browser
cache and what it actually requests from the server. THANK YOU VERY
MUCH for the detailed guidelines and code example that does what I
asked for.

Ok that was too much of a black humor but I read carefully your
explanations a number of times and there isn't anything about a clear
solution. On the contrary - you say that people shouldn't actually try
doing this and they shouldn't care because it isn't anything standart
and you actually don't like this sort of "hacking". And it doesn't work
with every strange browser someone might write one day reading the book
"how to write a browser for dummies".

Regards,
Nikolay

Jul 2 '06 #21
ns*******@gmail.com said the following on 7/2/2006 3:29 AM:
Randy Webb написа:
>ns*******@gmail.com said the following on 6/20/2006 4:22 PM:
>>Hi Richard,

I found your explanation and ignored it
And there is 99.99% of your problem.

Again... you tell me not to dig into it.
I said no such thing. You may want to pay more attention to who
posts/says what.

The answer to your question is in the explanation that you chose to
ignore and, once again, that is 99.99% of your problem. Not reading the
explanation given to you.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 4 '06 #22

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
2
by: Ben | last post by:
Hi all, I have written a web server that listens for requests: class MyHandler(BaseHTTPRequestHandler): def do_GET(self): if (self.path)=='/': data=makeList() else:
1
by: onewebclick | last post by:
Is there a way to detect a browser cache is full using javascript or HTML thorugh a web page and inform the user to clear the cache to improve performance of the website. It looks like google's...
1
by: oreng | last post by:
Hey all, I have some problems detecting whether the client's browser javascript is enabled at the server side. While Request.Browser.JavaScript only check if the browser enable java script (and...
7
by: Chris | last post by:
Can anybody tell me how to detect is the user has closed the browser Thank you
2
by: nsimeonov | last post by:
Hello, Does anyone have any idea how Gmail does this? I have a web application and people complain sometimes about some problems and most of the time it turns out it's the browser's cache being...
1
by: Big Daddy | last post by:
There are a few things that I store in the session cache hashtable for our application. The user gets a session when they log into the application. They can open more than one browser window...
8
by: Edward Diener | last post by:
Is there a way in Javascript, or perhaps in HTML, to force a browser to re-render an image on an HTML page after a round-trip between the client and the server ? In my particular case, the image...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.