Trying to cache gpack.travian.com

  • I am playing on com4, and noticed my browser was spending a lot of its time fetching data from gpack.travian.com. Upon investigation, I saw that the page was fetching compact.css which just contains javascript for fetching a bunch of other static .css files from gpack.travian.com. My browser is refetching all of these files on every page load instead of caching them.


    Wanting to speed up gameplay, I fetched a copy of all of these pages to my laptop's /var/www/htdocs/d8b7ddd7/mainPage/*, duplicating all of the relevant subdirectories and putting each document where it was expected, and then modified my /etc/hosts to point gpack.travian.com to localhost instead of the travian server.


    When I pointed my browser at compact.css it fetched the locally cached document as expected, but when I refreshed my travian game page the CSS failed to load (the page was unformatted). I removed the /etc/hosts entry and everything went back to normal (but still slow).


    Does anyone have suggestions as to what might be going on here, or if there is a better way to cache these files? I googled around and found there are downloadable "language packs", but those are Windows-specific and I am running Linux.

  • No suggestions?


    I was thinking of just putting the contents of all of the .css files and putting it into the compact.css local file, to eliminate the indirect loads entirely. Will update here with the results.

  • First of all, Travian works on https so in order to make it work, you'll need to override certificate and technically expose you to risk.
    Secondly, Travian is regularly updated and you'll need to re-download all those files for every update. For example, currently root folder is 75b613b8 rather than d8b7ddd7.
    And the last thing: currently all requests comes with proper HTTP headers so they should be cached very well.
    Even on emulated "slow 3G" connection, browser spends a few seconds on the main HTML file and then instantly gets everything from cache.
    Are you sure you haven't messed with browser settings?