{"id":767,"date":"2017-09-13T05:00:54","date_gmt":"2017-09-13T10:00:54","guid":{"rendered":"http:\/\/blog.hostdime.com.pe\/?p=767"},"modified":"2017-09-13T12:39:53","modified_gmt":"2017-09-13T17:39:53","slug":"como-implementar-cache-navegador-browser-tu-sitio-web-mejorar-sus-tiempos-carga","status":"publish","type":"post","link":"https:\/\/www.hostdime.com.pe\/blog\/como-implementar-cache-navegador-browser-tu-sitio-web-mejorar-sus-tiempos-carga\/","title":{"rendered":"Como implementar la cach\u00e9 del navegador (browser) para tu sitio web y mejorar sus tiempos de carga"},"content":{"rendered":"<p>Como implementar la web del navegador (<strong>browser, web cach\u00e9<\/strong>) para tu sitio web y <strong>mejorar sus tiempos de carga<\/strong>.Forma de hacerlo, manera de ponerla a andar, a funcionar.<!--more--><\/p>\n<p style=\"text-align: justify;\">Hemos recorrido un camino interesante: Aprendimos que era la web cach\u00e9 y las diferencias con las cookies (<a href=\"https:\/\/blog.hostdime.com.co\/\">Blog HostDime Colombia<\/a>), ahora queremos poner en pr\u00e1ctica lo aprendido y beneficiarnos del concepto.<\/p>\n<h2><span style=\"color: #ff6600;\">C\u00f3mo activarla<\/span><\/h2>\n<p style=\"text-align: justify;\">Vamos al administrador de archivos o ficheros (o usemos un gestor de FTP o por le m\u00e9todo que prefiera), en el home del sitio web localizamos el archivo <strong>.htaccess<\/strong> y a\u00f1adimos la siguientes l\u00edneas, preferiblemente luego de las que pusimos de compresi\u00f3n gzip:<\/p>\n<p style=\"text-align: justify;\"><code><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-813 alignleft\" src=\"https:\/\/www.hostdime.com.pe\/blog\/wp-content\/uploads\/2017\/09\/Como-implementar-la-cache\u0301-del-navegador-browser-para-tu-sitio-web-y-mejorar-sus-tiempos-de-carga2-300x230.jpg\" alt=\"Como-implementar-la-cache\u0301-del-navegador-(browser)-para-tu-sitio-web-y-mejorar-sus-tiempos-de-carga2\" width=\"477\" height=\"365\" \/>## BEGIN BROWSER CACHING ##<br \/>\nExpiresActive On<br \/>\nExpiresByType image\/jpg \"access 1 year\"<br \/>\nExpiresByType image\/jpeg \"access 1 year\"<br \/>\nExpiresByType image\/gif \"access 1 year\"<br \/>\nExpiresByType image\/png \"access 1 year\"<br \/>\nExpiresByType text\/css \"access 1 month\"<br \/>\nExpiresByType application\/pdf \"access 1 month\"<br \/>\nExpiresByType text\/x-javascript \"access 1 month\"<br \/>\nExpiresByType application\/javascript \"access 1 month\"<br \/>\nExpiresByType application\/x-javascript \"access 1 month\"<br \/>\nExpiresByType application\/x-shockwave-flash \"access 1 month\"<br \/>\nExpiresByType image\/x-icon \"access 1 year\"<br \/>\n## END BROWSER CACHING ## <\/code><\/p>\n<h2><span style=\"color: #ff6600;\">En resumen<\/span><\/h2>\n<p style=\"text-align: justify;\">B\u00e1sicamente lo que hacemos es decirle al navegador, a partir de este momento, las <strong>im\u00e1genes<\/strong> en formatos jpg, jpeg, gif, icon y png, los va a <strong>conservar<\/strong> en el browser del usuario por <strong>un a\u00f1o<\/strong> salvo que se actualicen.Digamos que se pone as\u00ed tan a largo plazo porque no suelen cambiar.<br \/>\nAplicamos el mismo concepto a los css, pdf, Js pero solo a un mes pues esto si tiene una frecuencia de cambio mayor.Habr\u00e1 quien desee a\u00f1adir as\u00ed mismo los ficheros html y xml por ejemplo, es cuesti\u00f3n de gustos.<\/p>\n<p style=\"text-align: justify;\">Pr\u00f3ximamente m\u00e1s tips para hacer de tu sitio web un Turbo, algo de m\u00e1xima velocidad y que tiemble el internet.<\/p>\n<p>Leer tambi\u00e9n: <a href=\"https:\/\/www.hostdime.com.pe\/blog\/sabes-si-tu-pagina-esta-optimizada-moviles-averigualo\/\">\u00bfSabes si tu p\u00e1gina est\u00e1 optimizada para m\u00f3viles? \u00a1Averigualo!<\/a>, <a href=\"https:\/\/www.hostdime.com.pe\/blog\/que-es-pagespeed-insights-google-como-usar\/\">\u00bfQu\u00e9 es el Pagespeed insights de Google? Como usar<\/a>, <a href=\"https:\/\/www.hostdime.com.pe\/blog\/como-puedo-optimizar-velocidad-carga-mi-web\/\">\u00bfC\u00f3mo puedo optimizar la velocidad de carga de mi web?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Como implementar la web del navegador (browser, web cach\u00e9) para tu sitio web y mejorar sus tiempos de carga.Forma de hacerlo, manera de ponerla a andar, a funcionar.<\/p>\n","protected":false},"author":2,"featured_media":809,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-767","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-posicionamiento-web"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/posts\/767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/comments?post=767"}],"version-history":[{"count":0,"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/posts\/767\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/media\/809"}],"wp:attachment":[{"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/media?parent=767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/categories?post=767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostdime.com.pe\/blog\/wp-json\/wp\/v2\/tags?post=767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}