SPUtility.MakeBrowserCacheSafeLayoutsUrl Method

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)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Shared Function MakeBrowserCacheSafeLayoutsUrl ( _
    name As String, _
    localizable As Boolean _
) As String
'Usage
Dim name As String
Dim localizable As Boolean
Dim returnValue As String

returnValue = SPUtility.MakeBrowserCacheSafeLayoutsUrl(name, _
    localizable)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
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).

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace