Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am, on a nearly daily basis, accessing my companies staff directory that is hosted on our wiki. The "problem" (and I use the term loosely) is that when I load the page everybody has a picture associated with their row in the directory.

Is there any way I can cache all the pictures so I don't have to wait for everyone's picture to load?

share|improve this question
1  
you need to change the cache settings on the server –  ratchet freak Apr 18 '13 at 13:18
    
i had a feeling the change had to be made on the server side but i was wondering if there was something i could do on my end. –  Ramy Apr 18 '13 at 14:44
1  
I’m not even sure whether this is possible, and if it is, it will be awkward –– but can you write a script to wget the page (HTML only; no embedded objects), strip out the IMG tags, and display it? Alternatively, you could save the page as a complete HTML page, create your own explicit cache of the images, and write your script to redirect the IMG tags to point to those. –  Scott Apr 18 '13 at 21:05

2 Answers 2

up vote 4 down vote accepted

You can try increasing the size of your local browser's cache. But it may depend largely on the meta tags on the page. For example the page could be set to expire immediately or no-cache (see here for more discussion.

If it is really bugging you could set up a local proxy server. See this post Run a local proxy server for one example of how this could be done.

share|improve this answer

Take a look at using SQUID or VARNISH, bot open source packages, in proxy mode for your site. Set policies to cache images for an extended period, such as 48 hours. You can also apply this caching policy to Style Sheets, JavaScript Files, fonts, etc... You will also likely want to set policy to cache only servers within your internet domain or specific IP addresses to prevent users from downloading and caching content from CNN, FoxNews, or that one developer who you suspect of cruising adult sites from work.

The first person who hits the defined sever will seed the cache. The second and subsequent user will be pulling the cached items from the caching proxy instead of going out across your intranet to hit the Wiki. This should also speed up the Wiki for other users due to the reduced load.

What also should happen in tandem is the administrators of the wiki server should be setting policies on the server which allow for the caching of static content at remote hosts. If this happens then the only policy for caching which would need to be set on Squid or Varnish would be that of hosts, as the caching policy for the server could then be respected.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.