By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,848 Members | 3,202 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,848 IT Pros & Developers. It's quick & easy.

Re: Caching icons in browser

P: n/a
В Четверг 16 октября 2008 17:21, sasuke писал:
Maybe because you monitored the HTTP traffic after viewing the clock
first? In my case there were 75 requests in one minute.
There is many requests indeed, but it's rather normal - Steve has put online
various weird stuff which needs to be loaded :-)

As for the binary clock, my Firefox sends the following commands:
GET /stephen.joung/binclock_8.jpg HTTP/1.1
GET /stephen.joung/binclock_4.jpg HTTP/1.1
GET /stephen.joung/binclock_2.jpg HTTP/1.1
GET /stephen.joung/binclock_1.jpg HTTP/1.1

These commands are sent only once. No more.
Steve, consider setting the proper response headers esp those related
to caching when serving your images. Consult your web servers'
documentation for more details. Google for 'cache response header' or
something along those lines to get started.
Exactly.
In fact, your server isn't transmitting any cache-control directives,
therefore it's up to the browser to use (or not) any caching mechanism
(that's why my Fx is not requesting any data twice, but some other UA could
do so).

Anyway - it's not related to JavaScript, but rather to your http
implementation :-)

Regards,
Mateusz Viste
Oct 16 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Oct 16, 6:30pm, Mateusz Viste
<mateusz.visteATmailDO...@invalid.invalidwrote:
16 2008 17:21, sasuke :

There is many requests indeed, but it's rather normal - Steve has put online
various weird stuff which needs to be loaded :-)
weird stuff indeed ;-)

Anyway - it's not related to JavaScript, but rather to your http
implementation :-)
I found out what the problem was, and even though as you correctly
observed it wasn't a javascript problem I will post the solution here
for completeness' sake. I upgraded to Ubuntu 8.04 and as part of the
upgrade I got a new Firefox. For some reason the cache was disabled. I
typed "about:config" in the location bar and pressed the Enter key and
reset "browser.cache.enabled" to True.

Regards, Steve.

Oct 21 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.