Export (0) Print
Expand All

SPUtility.MakeBrowserCacheSafeLayoutsUrl method (String, Boolean)

Returns a new URL that will not be cached by the browser when the associated file changes. The file name must be relative to the layouts directory in the file system. For example, if an URL contains "layouts/images" it is relative to the layouts directory but the images directory is not under the layouts directory in the file system and therefore it cannot be used with this method.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static string MakeBrowserCacheSafeLayoutsUrl(
	string name,
	bool localizable
)

Parameters

name
Type: System.String

The name of the file relative to the layouts directory.

localizable
Type: System.Boolean

A Boolean value that determines whether or not to include the layouts directory. If true, the language directory is included.

Return value

Type: System.String
The full URL to the file relative to the domain (site).
Show:
© 2014 Microsoft