Tuesday, December 20, 2011

download yslowHow do I know if my browser got an image from its cache or downloaded it "fresh"?

Not sure how else to phrase it...I'm a developer and I want to see if images are taken from the cache or downloaded anew. I want to see this EACH TIME the browser loads a page. Can't find anything like that in YSlow.FireBug. Any help is appreciated. Thanks!
hold down control and hit F5 to reload download yslowa fresh version of the page and/or add the meta "no-cache" tag.
you did not specify the programming language which you use

usually in asp.net with C#
try the following code while loading the image from cache

Response.Write(DateTime.Now());

as you refresh the browser, if the time changedownload yslows than you can say that image is loaded as refresh,but if the time is same then it is loaded from cache.
You can't "see" it - you can force the browser to read a new page, either in the browser (if you're the user) or on the page (if you're the developer).

No comments:

Post a Comment