Browser Cache

The browser cache section is used to control how your customers' web browsers will utilize local caching of HTML, CSS, JavaScript, images, fonts and others. Browser cache modifies your .htaccess file. Before the modification a backup file called .htaccess-backup is created.

NoteIf your site is running on NGINX, the CSS and JavaScript browser cache cannot be controlled by NitroPack, because NGINX does not support dynamic configurations using .htaccess. You will have to contact your hosting provider and ask them to configure browser cache in NGINX for you.

The following settings are available:

browser_cache

1. Browser Cache Status (Enabled / Disabled) - NitroPack's browser cache requires some specific .htaccess rules to be present. When this setting is enabled, NitroPack adds the needed rules to the .htaccess file. When you set this to disabled NitroPack removes the rules if they are present.

2. OpenCart Pages > Set Cache-Control Header - Sets a Cache-Control header for the cached HTML content by NitroPack page cache. Available for all browsers, except Internet Explorer. The caching period is set to 1 year. More information about the Cache-Control header can be found here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

3. OpenCart Pages > Set Expires Header - This sets an Expires header in a future date which will be the expiration date or time for files sent by your server. The expiration information is used by also by proxy servers. Enabling this option also serves a 304 response code to the user browser. More information can be found here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5

4. OpenCart Pages > Set Last-Modified Header - This sets a Last-Modified header which specifies a characteristic about the resource that the browser checks to determine if the files are the same. The value of this header is always a date. Also, Last-Modified is a 'weak' caching header in the sense that the browser applies a heuristic to determine whether to fetch the item from cache or not. The heuristics are different among different browsers. Enabling this option also serves a 304 response code to the user browser. More information can be found here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5

5. CSS, JavaScript, XML and text > Cache css, js, txt, xml files for a period of: - When NitroPack informs the client's browser that a resource can be cached, it needs to say how long should the browser keep the file in its cache. With this setting you can configure how long this should be for the CSS, JavaScript, XML and text resources.

6. Images > Cache jpg, jpeg, png, gif, swf files for a period of: - When NitroPack informs the client's browser that a resource can be cached, it needs to say how long should the browser keep the file in its cache. With this setting you can configure how long this should be for images.

7. Icons, Fonts, PDF and Flash video > Cache otf,ico,pdf,flv files for a period of: - When NitroPack informs the client's browser that a resource can be cached, it needs to say how long should the browser keep the file in its cache. With this setting you can configure how long this should be for documents and video.