Quantcast
Channel: Atozed Forums - All Forums
Viewing all articles
Browse latest Browse all 355

Web Cache (JavaScript, PNG,...)

$
0
0
Hi everyone,
I'm using IntraWeb 15.2.25, and in my project, I would like to serve static files through browser caching.
I added four files in the HTMLHeaders of my IW ServerController (2 JavaScript files and 2 images).

First, I would like to know if this step alone is enough for browsers to cache the referenced files directly.

If not, I understand that it is necessary to use the IWServerControllerBaseBeforeDispatch method to handle static files we want to cache (specifying Cache-Control, expiration time, etc.).

Are these two approaches complementary? As I understand it, the first allows injecting code into the HTML header, while the second intercepts requests and customizes the HTTP response?

Thanks in advance for your help, simple examples would be very much appreciated.

Best regards,

Sébastien NOËL
Delphi Developer

Viewing all articles
Browse latest Browse all 355

Trending Articles