Controlling Browser Caching. NetIQ 4.2
إعلان
إعلان
You use this value to reduce the maximum time the proxy service waits before checking whether requested objects need to be refreshed. The default is 6 hours.
HTTP Default:
Specifies the maximum time the proxy service serves HTTP data for which
Webmasters have not specified a freshness or Time to Expire directive. The default is 2 hours.
4
To save your changes to browser cache, click
OK
.
5
To apply the changes, click the
Access Gateways
link, then click
Update
>
OK
.
Controlling Browser Caching
Webmasters control how browsers cache information by adding the following cache-control directives to the HTTP headers:
Cache-Control: no-store
Cache-Control: no-cache
Cache-Control: private
Cache-Control: public
Pragma: no-cache
You can configure how the proxy service responds to these directives in the HTTP header.
1
In the Administration Console, click
Devices
>
Access Gateways
>
Edit
>
[Name of Reverse
Proxy]
>
[Name of Proxy Service]
>
HTTP Options
.
2
To mark all pages coming through this host as cacheable on the browser, select
Allow Pages to be Cached by the Browser
.
When this option is enabled, the no-cache and no-store headers are not injected into the HTTP header.
You need to select this option if you have a back-end application that updates the data in the
Last-Modified or ETag HTTP headers. These changes are forwarded from the Web server to the browser only when this option is enabled.
You need to select this option if you want the Expires HTTP header forwarded from the Web server to the browser.
If this option is not selected, all pages are marked as non-cacheable on the browser. This forces the browser to request a resend of the data from the Access Gateway when a user returns to a previously viewed page.
3
Click
OK
.
4
To apply the changes, click the
Access Gateways
link, then click
Update
>
OK
.
Configuring a Pin List
A pin list contains URL patterns for identifying objects on the Web. The Access Gateway uses the list to prepopulate the cache, before any requests have come in for the content. This accelerates user access to the content because it is retrieved from a local cache rather than from an exchange with the
Web server, which would read it from disk.
You can use the pin list to specify the following:
Which objects you want to cache
Which objects you never want cached
The pin list is global to the Access Gateway and affects all protected resources. The objects remain in cache until their normal cache limits are reached or they are bumped out by more recently requested objects.
254
Setting Up an Advanced Access Manager Configuration
To configure a pin list:
1
In the Administration Console, click
Devices
>
Access Gateways
>
Edit
>
Pin List
.
2
Select the
Enable Pin List
option to enable the use of pinned objects. If this option is not selected, the pinned objects in the pin list are not used.
3
In the
Pin List
section, click
New
.
4
Fill in the following fields.
URL Mask:
Specifies the URL pattern to match. For more information, see
Pin Type:
Specifies how the URL is to be used to cache objects. Select from
Normal
and
Bypass
. For more information, see “Pin Type” on page 257 .
5
To save the list item, click
OK
.
6
To save your changes to browser cache, click
OK
.
7
To apply the changes, click the
Access Gateways
link, then click
Update
>
OK
.
URL Mask
The URL mask can contain complete or partial URL patterns. A single URL mask might apply to a large set of URLs, or it might be so specific that only a single file on the Web matches it.
The Access Gateway processes the masks in the pin list in order of specificity. A mask containing a hostname is more specific than a mask that specifies only a file type. The action taken for an object is the action specified for the first mask that the object matches.
The Access Gateways recognizes four levels of specificity, using the following format:
Level
hostname
Examples
http://www.foo.gov/documents/picture.gif
http://www.foo.gov/documents/* http://www.foo.gov
foo.gov/documents/* foo.gov/*
All of these are classified as hostnames, and they are ordered by specificity. The first item in the list is considered the most specific and is processed first. The last item is the most general and is processed last.
Setting Up an Advanced Access Manager Configuration
255
Level
path filename file extension
Examples
/documents/picture.gif
/documents/pictures.gif/*
/documents/*
Path entries are processed after hostnames. A leading forward slash must always be used when specifying a path, and the entry that follows must always reference the root directory of the Web server. In these examples, documents is the root directory.
The /* at the end of the path indicates that the entry is a directory. Its absence indicates that the entry is a file. In these examples, picture.gif is a file and pictures.gif/*
and documents/* are directories.
If you enter a path without the trailing *, the path matches only the directory. With the trailing *, the path matches everything in the directory and its subdirectories.
These path entry examples are ordered by specificity. The objects in the / documents/picture.gif
directory are processed before the objects in the / documents directory.
/picture.gif
/widget.js
/widget.jp*g
/picture*group.gif
/DailyTask
/DailyTask*
Filenames are processed after paths. A leading forward slash must always be used when specifying a filename.
You can add asterisks in the file names.
/*.gif
/*.js
/*.htm
File extensions are processed last. They consist of a leading forward slash, an asterisk, a period, and a file extension.
NOTE:
More than one wildcard is not allowed in a URL mask. For example, /*picture.g*f is not correct.
Also, the wildcard must be only in the last part of the path. For example:
Correct: /picture/*.gif
Incorrect: /documents/*/picture.gif
Specific rules have precedence over less specific rules. Thus, objects matched by a more specific rule are always processed according to its conditions. If a less specific rule also matches the object, the less specific rule is ignored for the object. For example, assume the following two entries are in the pin list:
256
Setting Up an Advanced Access Manager Configuration
تنزيل
إعلان