What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Would you consider allowing static files to be cached please?

alexharries

New Around Here
Hi Merlin,

I really enjoy using your firmware but I have to administer my router remotely via a slow internet connection.

Would it be possible to add a far-future cache-control header to static resources such as jquery.js and images, as each page load carries several hundred KB of files which could be cached by the browser.

To prevent stale files causing problems - e.g. when a firmware update takes place - you could add a query parameter to the end of each resource's URL which relates to the firmware version, e.g.:

<script language="JavaScript" type="text/javascript" src="/general.js?fw123.56b3"></script>

My back-of-a-napkin maths tells me this would probably save around 500KB per page load - on my ADSL upstream connection, that is a time saving of 20 seconds for every page load.

If I knew how to program C, I would try and provide a patch for you on Github, but I unfortunately can't help :(

Thanks very much in advance and please keep up the good work! :)

Alex H
 
I'm already caching what can be cached. I can't blanket-cache Javascripts because a lot of them contain dynamic data that's modified by the httpd as it pushes them to the router. This is why I limited it to images and CSS.

Adding a mechanism such as you describe would require making hundred of changes all over the webui, which would make it a nightmare to merge newer Asus code, so it's out of the question.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top