I'm struggling to optimise caching for our custom Hotspot code. MikroTik web server variables allow changing the Cache Control and Expires header options for the HTML pages, but any JavaScript, CSS, Images, Icons etc. loaded from that page have default options which prevent caching.
The following code works fine for the page it is installed in, but not content that page loads:-
Code: Select all
$(if http-header == "Expires")Thu, 31 Dec 2037 23:59:59 GMT$(endif)
$(if http-header == "Cache-Control")max-age=172800$(endif)
Does MikroTik Hotspot Web Server support Apache style .htaccess files or any other similar method to enable Server Reponse Headers to be manipulated?
In the past our pages have been pretty simple, but I'm trying to implement JQuery Mobile and preformance is becoming an issue without proper caching.
I can serve all the static content from a "Cloud" Server, Apache2 has really good cache control features allowing different values to be given to different files types. However, if for some reason the Internet connection or Server is unavailable, then the basic pages on the MikroTik Hotspot router will either fail to load at all or will likely render incorrectly due to some files being missing.
Has anyone found the trick to solving this issue on the MikroTik Router? We have nearly 300 of these routers deployed so using different hardware to get the advantages of Apache isn't really a cost effective option.
Any help solving this would be most appreciated.
Regards
CM