All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hpe.nv.analysis.dtos.reports.bestpractices.Resources Maven / Gradle / Ivy

Go to download

This Java library lets you call the NV API in your automatic tests (for example, your Selenium tests). You can use this API instead of using the NV Test Manager user interface.

The newest version!
/*************************************************************************
 (c) Copyright [2016] Hewlett Packard Enterprise Development LP

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*************************************************************************/

package com.hpe.nv.analysis.dtos.reports.bestpractices;

public class Resources {
  public static final String pluginName = "best practices";

  public static final String pluginType = "Best Practices Report";
  public static final String pluginSubtype = "Web Applications Best Practices Report";
  public static final String pluginVersion = "0.5";

  public static final String bestPracticeForMobileWeb = "Mobile and Web Applications";
  public static final String bestPracticeForWeb = "Web";
  public static final String bestPracticeForMobile = "Mobile";

  public static final String compressionName = "Compress Components";
  public static final String compressionDescription = "Checks that textual elements are transferred in a compressed format. " +
      "Compression usually reduces the response size by about 70%. Approximately 90% of current Internet traffic " +
      "travels through browsers that claim to support gzip. ";
  public static final String compressionFailureServerSide = "Server sent %d uncompressed responses totalling %s.  If compressed the total size would be %s, a %.1f%% saving";
  public static final String compressionFailureClientSide = "Client requested compressable data without specifying encoding content type.  This resulted in %d uncompressed responses totalling %s.  If compressed the total size would be %s, a %.1f%% saving";

  public static final String expiresName = "Add long term headers expiration dates";
  public static final String expiresDescription = "Missing or near future header expiration dates prevent effective caching. This results " +
	      "in subsequent user visits to your site reloading resources over the network instead of leveraging the browser cache.";
  public static final String expiresFailureExpirationInThePast = "Expiration date is in the past";
  public static final String expiresFailureNoExpiration = "An expiry date or a maximum age was not present in the headers.  Most browsers will heuristically cache based on the last modified date.";
  public static final String expiresFailureExpirationSoon = "Expiration date is within the next two days";

  public static final String redirectionName = "Avoid URL redirects";
  public static final String redirectionDescription = "URL redirects add unnecessary round trips; use dynamic links or dynamic files.";
  public static final String redirectionCode301 = "Permanent redirection (301)";
  public static final String redirectionCode302 = "Temporary redirection (302)";
  public static final String redirectionUnknown = "Unknown redirection"; // should
                                                                         // never
                                                                         // happen

  public static final String makeFewerRequestsNameIPhone = "Make fewer HTTP requests (iPhone)";
  public static final String makeFewerRequestsNameDesktop = "Make fewer HTTP requests (desktop)";
  public static final String makeFewerRequestsDescription = "Each HTTP requests adds protocol overhead and requires a full roundtrip " +
      "HTTP requests usually consume most of the browser's capacity while displaying the page, " +
      "therefore reducing the number of HTTP requests is one of the most effective ways to improve browser performance.";
  public static final String makeFewerRequestsJavascripts = "There are %d requests for javascripts";
  public static final String makeFewerRequestsStylesheets = "There are %d requests for stylesheets";
  public static final String makeFewerRequestsCssImages = "There are %d requests for background images";
  public static final String makeFewerRequestsObjects = "HTML pages referring more than %d static objects";

  public static final String reduceDnsLookupsName = "Use fewer domains";
  public static final String reduceDnsLookupsDescription =
	      "Each new domain name results in a costly lookup. " +
	          "Refrain from using too many domains for a limited number of resources. " +
	          "Note: Popular third party domains associated with analytics, advertising and social media sites are ignored by this best practice.";
  public static final String reduceDnsLookupsSingleResourceDomain = "Domains that host a single resource";
  public static final String reduceDnsLookupsDoubleResourceDomain = "Domains that host only two resources";
  public static final String reduceDnsLookupsTripleResourceDomain = "Domains that host only three resources";

  public static final String avoid4xx5xxName = "Avoid 4xx and 5xx status codes";
  public static final String avoid4xx5xxDescription = "Resources that generate 4xx and 5xx status codes typically  deliver no value to the end user, and can slow down the page.";
  public static final String avoid404Violation = "%d resource(s) resulted in a 404 Not Found";
  public static final String avoid500Violation = "%d resource(s) resulted in a 500 Internal Server Error";
  public static final String avoid4xxViolation = "%d resource(s) resulted in 4xx errors other than 401 or 404";
  public static final String avoid5xxViolation = "%d resource(s) resulted in 5xx errors other than 500";
  
  public static final String avoid4xx5xxDetail = "%s (%s)";

  public static final String avoidLargeObjectsName = "Avoid large objects";
  public static final String avoidLargeObjectsDescription = "Large objects should be compressed in some way, or split";
  public static final String avoidLargeObjectsViolation = "There were %d objects bigger than %s.  The total size is %s";

  public static final String reduceNumberOfChunksName = "Reduce the number of HTTP chunks";
  public static final String reduceNumberOfChunksDescription = "Every HTTP chunk adds delay to the transaction";
  public static final String reduceNumberOfChunksViolation = "Response is split into more than %d chunks";

  public static final String domainShardingNameIPhone = "Use domain sharding (iPhone)";
  public static final String domainShardingNameDesktop = "Use domain sharding (desktop)";
  public static final String domainShardingDescriptionIPhone = "Mobile Safari on the iPhone is only able to download 4 resources simultaneously from " +
      "the same domain. Split the resources between several domains to maximize the benefits of parallelization.";
  public static final String domainShardingDescriptionDesktop = "Current browsers download up to 6 resources from the same domain at a time. " +
      "Split the resources between several domains to maximize benefits from parallelization";
  public static final String domainShardingTooFewDomains = "%d resources were found on the following domain(s). Consider dividing them between %d domains";
  public static final String domainShardingTooManyOnSingleDomain = "%d out of %d resources are hosted on the following domain. Consider hosting some of these resources on another domain";

  public static final String imageScalingName = "Avoid image scaling in HTML";
  public static final String imageScalingDescription = "Downscaling an image in the HTML means that an image that is a larger than required was sent to the client, making the page load slower";
  public static final String imageScalingViolation = "Image was downscaled in HTML";

  public static final String useCdnName = "Use a Content Delivery Network (CDN)";
  public static final String useCdnDescription = "Use a Content Delivery Network (CDN) to cut down response time, " +
      "by hosting resources closer to your users. A CDN contains a number of web servers distributed across multiple " +
      "locations so that content can be delivered more efficiently to users.";
  public static final String useCdnFreelyGoogleHostedLibraries = "Javascript libraries freely hosted by Google (http://code.google.com/apis/libraries/)";
  
  public static final String useCdnForStaticResources = "There are %d static components on %d host domains that are not on a CDN.";
  public static final String useCdnForStaticResourcesSingleDomain = "There are %d static components that are not on a CDN.";
  
  public static final String enableProxyCachingName = "Leverage proxy caching";
  public static final String enableProxyCachingDescription = "Using public proxy servers to cache your site's static resources " +
      "improves the Total Response Time, even for first time users.";
  public static final String enableProxyCachingRemoveQueryStrings = "Using a query string may disable caching on public proxies";
  public static final String enableProxyCachingSpecifyVaryEncoding = "Set the 'Vary: Accept-Encoding' response header";

  public static final String useHtmlStorageName = "Leverage HTML5 storage";
  public static final String useHtmlStorageDescription = "By using HTML 5 storage capabilities, " +
      "you can store resources and data, and load them quickly, even when experiencing poor network conditions";

  public static final String avoidUnsupportedElementsName = "Avoid unsupported elements in your HTML code";
  public static final String avoidUnsupportedElementsDescription = "Unsupported elements will not be rendered by mobile Safari and will only increase the page size";
  public static final String avoidUnsupportedElementsTagEmbed = "Embed";
  public static final String avoidUnsupportedElementsTooBigImages = "Images on the iPhone should not be greater than 3M pixels";

  public static final String avoidEmptySrcName = "Avoid HTML elements with empty src or href attributes";
  public static final String avoidEmptySrcDescription = "When encountering an empty src or href attribute, browsers may make redundant " +
      "requests to the server. This may lead to wasting server computing cycles generating a page that will never be viewed; " +
      "corruption of the user data, and possibly cripple your servers by sending large amounts of unexpected traffic.";
  public static final String avoidEmptySrcScripts = "Documents contain script tags with empty src attributes";
  public static final String avoidEmptySrcLinks = "Documents contain link tags with empty href attributes";
  public static final String avoidEmptySrcImages = "Documents contain image tags with empty src attributes";

  public static final String minifyResourcesName = "Minify your textual components";
  public static final String minifyResourcesDescription = "By removing non-essential material, such as whitespaces " +
      "and comments from your script and stylesheet components, " +
      "you can improve their download time, and your site's overall performance";
  public static final String minifyResourcesUnminifiedScripts = "Scripts that can be minified";
  public static final String minifyResourcesUnminifiedStylesheets = "Stylesheets that can be minified";
  public static final String minifyResourcesUnminifiedInlineScript = "Documents containing inline scripts that can be minified";
  public static final String minifyResourcesUnminifiedInlineStylesheets = "Documents containing inline stylesheets that can be minified";

  public static final String reduceCookiesName = "Try to reduce the size of the cookies";
  public static final String reduceCookiesDescription = "Long cookies might make transmitting outgoing requests take longer than needed. " +
      "For static resources, like images and scripts, it is recommended to use cookie-free domains. " +
      "See http://yuiblog.com/blog/2007/03/01/performance-research-part-3/ for more details.";
  public static final String reduceCookiesViolationCookiesTooBig = "Cookies are longer than %d bytes";
  public static final String reduceCookiesViolationCookiesOnStaticResources = "There were %d non-third party static resources with request cookies.  In total %d bytes of cookies were transmitted for these resources";
	
  public static final String avoidJavascriptInHeadName = "Avoid loading javascripts in the head section";
  public static final String avoidJavascriptInHeadDescription = "Downloading javascripts in the head section may block other resources from downloading";
  public static final String avoidJavascriptInHeadViolationScriptInHead = "Scripts found in the head section of %s";

  public static final String avoidImagesInCssName = "Avoid referencing images in stylesheets";
  public static final String avoidImagesInCssDescription = "Images referenced in a stylesheet are only downloaded once the stylesheet itself " +
      "is downloaded. By limiting the number of images referenced in stylesheets, and using css-sprites, the total page download time can be decreased, " +
      "and it may visually seem to be loaded faster";
  public static final String avoidImagesInCssViolation = "Images that are referenced in %s";

  public static final String avoidBlockingResourcesName = "Avoid resources which are blocking parallel downloading";
  public static final String avoidBlockingResourcesDescription = "A resource which is downloaded alone, without anything downloaded in parallel " +
      "means you're probably not using all of the available bandwidth";
  public static final String avoidBlockingResourcesViolation = "Component that's blocking parallel downloads for more than %d milliseconds";
  public static final String avoidBlockingResourcesViolationLast = "Component that blocks the end of a transaction for more than %d milliseconds and should be split and downloaded in parallel";
  public static final String avoidBlockingResourcesViolationChain = "Components that create a daisy chain blocking parallel downloads for more than %d milliseconds (%d)";

  public static final String optimizeImagesNameIPhone = "Reduce the size of your images (iPhone)";
  public static final String optimizeImagesNameDesktop = "Reduce the size of your images (desktop)";
  public static final String optimizeImagesDescription = "Converting gif to png, and converting all " +
      "pngs to png8 will reduce image size significantly and most likely will have no visible effect";
  public static final String optimizeImagesDescriptionImageBloat = "Images frequently can be reduced in size with no noticeable visual changes";
  public static final String optimizeImagesViolationGIF = "GIF images which are non-animated usually can be converted to PNG8";
  public static final String optimizeImagesViolationPNGSmall = "PNG images having a small pixel count should be converted to PNG8. %d PNGs totaled %s.";
  public static final String optimizeImagesViolationPNGFewColors = "PNG images which have a small number of colors and should be converted to PNG8. %d PNGs totaled %s.  You can expect to see a size reduction that is over 50%%";
  public static final String optimizeImagesViolationBigMobileImage = "Images which are bigger than 1/4 of a typical mobile device screen size should probably be reduced";
  public static final String optimizeImagesViolationBigDimension = "Images whose %s is bigger than the iPhone's screen size";

  public static final String imageSizeViolation = "Optimize images to reduce size.  %d large images totalled %s.  If optimized they might only take %s, a %.1f%% saving";
  public static final String imageSizeViolationDetail = "%s (%s; optimized size %s, %.1f%% of original)";
  public static final String violationObjectAndAssociatedSize = "%s (%s)";
  public static final String violationObjectAndAssociatedSizeAndDimension = "%s %d X %d pixels (%s)";
  
  public static final String removeDuplicateFilesName = "Don't download the same data twice";
  public static final String removeDuplicateFilesDescription = "Instead of downloading the same data twice, cache it and load it from the cache when needed.";
  public static final String removeDuplicateFilesViolation = "Duplicate files (Hash group %d)";
  public static final String removeDuplicateFilesSimilarityViolation = "Similar files (group %d)";

  public static final String specifyCharacterSetName = "Specify your HTML documents' character sets";
  public static final String specifyCharacterSetDescription = "To specify a character set in the HTTP response headers, see " +
      "http://code.google.com/speed/page-speed/docs/rendering.html#SpecifyCharsetEarly. " +
      "Defining the character encoding in the HTTP response headers permits the browser to begin parsing HTML and execute scripts immediately. " +
      "Specify a content type for all resources, and ensure that charset parameter in the HTTP header matches the charset parameter in the HTML meta tag.";
  public static final String specifyCharacterSetViolationNoCharacterSet = "HTML resource(s) where no character set was specified";
  public static final String specifyCharacterSetViolationCharacterSetIsNotFirst = "HTML resource(s) where character set was specified, but wasn't the first element in the HTML header";

  public static final String putCssAtTheBottomName = "Place reference to external CSS resources at the bottom of the HTML document";
  public static final String putCssAtTheBottomDescription = "To enable quicker progressive rendering on the iPhone, " +
      "use a minimal stylesheet in the header, and the more elaborate styles in a stylesheet towards the end of the HTML.";
  public static final String putCssAtTheBottomViolation = "A referenced stylesheet was followed by a non-stylesheet element";

  public static final String increaseKeepAliveTimeoutName = "Increase the Server's keep alive timeouts";
  public static final String increaseKeepAliveTimeoutDescription = "By setting a timeout value on the server side that is too small, " +
      "clients are prevented from using the same TCP connections " +
      "for several HTTP requests. This results in more round trips, and inferior overall performance.";
  public static final String increaseKeepAliveTimeoutViolationFin = "(Number of) TCP sessions terminated (FIN) by the server";
  public static final String increaseKeepAliveTimeoutViolationRst = "(Number of) TCP sessions reset (RST) by the server";

  public static final String imageResolutionName = "Optimize images to device used";
  public static final String imageResolutionDescription = "Using images with higher resolution than that of the iPhone's screen is not advised " +
      "and wastes network resources";
  public static final String imageResolutionViolationTooBigRetinaDisplay = "Images that are more than 960x640 pixels in size (Retina display)";
  public static final String imageResolutionViolationTooBigOldDisplay = "Images that are more than 480x320 pixels in size (iPhone 3gs display)";

  public static final String thirdPartiesName = "Minimize number of third-party resources";
  public static final String thirdPartiesDescription = "Third party ads, analytics and widget providers (such as Facebook, Google Analytics or DoubleClick) " +
      "may postpone the transaction's main content from loading and delay page rendering";
  public static final String thirdPartiesViolationAds = "Third party ads";
  public static final String thirdPartiesViolationAnalytics = "Third party user-analytics libraries";
  public static final String thirdPartiesViolationWidgets = "Third party widgets";
  public static final String thirdPartiesViolationComponents = "Third party components on *.";
  public static final String thirdPartiesViolationComponentsSummary = "There were %d third party component%s (%dK) hosted across %d domain%s.  Third party components resulted in %.1f%% of the total downloaded bytes.";

  public static final String locallyStoreStaticImagesName = "Locally store static images";
  public static final String locallyStoreStaticImagesDescription = "Images that don't change often, such as UI elements, logos and place holders should be stored locally rather than loaded from the network";
  public static final String locallyStoreStaticImagesNameViolation = "Suspected static images";

  public static final String locallyStoreRenderingCodeName = "Locally store rendering code files";
  public static final String locallyStoreRenderingCodeDescription = "Rendering code such as HTML templates, CSS and Javascript files can be stored locally on the client device. Only transient data should be sent over the network.";
  public static final String locallyStoreRenderingCodeViolation = "Suspected rendering code files";

  
  public static final String avoidBandwidthCongestionName = "Avoid congestion due to limited bandwidth";
  public static final String avoidBandwidthCongestionDescription = "Downloading too many files in parallel my over-congest some limited-bandwidth networks. "+
  	"This in turn may lead to packet retransmissions and overall degraded performance.";
  public static final String avoidBandwidthCongestion25Violation = "Number of retransmitted packets is over 25% starting at about %d second since transaction start";
  public static final String avoidBandwidthCongestion50Violation = "Number of retransmitted packets is over 25% starting at about %d second since transaction start";
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy