<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Rıza Sırman &#187; Optimizasyon</title> <atom:link href="http://www.rizasirman.com/web-tasarimi/asp-net/optimizasyon/feed/" rel="self" type="application/rss+xml" /><link>http://www.rizasirman.com</link> <description>Dijital Pazarlama ve İletişim Uzmanı</description> <lastBuildDate>Thu, 10 May 2012 08:00:11 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>İçerikten HTML kodu temizleme &#8211; Strip HTML</title><link>http://www.rizasirman.com/web_tasarim/asp-net/icerikten-html-kodu-temizleme-strip-html/</link> <comments>http://www.rizasirman.com/web_tasarim/asp-net/icerikten-html-kodu-temizleme-strip-html/#comments</comments> <pubDate>Fri, 03 Dec 2010 12:39:26 +0000</pubDate> <dc:creator>Rıza Sırman</dc:creator> <category><![CDATA[ASP.NET]]></category> <category><![CDATA[c#]]></category> <category><![CDATA[Optimizasyon]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[arama motoru]]></category> <category><![CDATA[description]]></category> <category><![CDATA[html]]></category> <category><![CDATA[optimizasyon]]></category> <category><![CDATA[seo]]></category> <category><![CDATA[strip]]></category> <category><![CDATA[temizleme]]></category><guid isPermaLink="false">http://www.rizasirman.com/?p=528</guid> <description><![CDATA[Web sitenizden Ajax Control Toolkit HTML editör gibi bir editörden girilen html, css ve javascript içeren içeriklerden, belirli uzunluğa kadar kullanılan bölümleri temizleyip, SEO description olarak kullanmak, programatik yaratılan arama motoru optimizasyonlarında sıkça kullanılan bir yöntemdir. Ancak description bölümünde herhangi bir kodun karışması sitenizin görüntüsünü ve çalışmasını olumsuz yönde etkileyecektir. Aşağıdaki kodu kullanarak html içeriklerinizi&#8230;]]></description> <content:encoded><![CDATA[<p><img src="http://www.rizasirman.com/wp-content/uploads/2010/11/html-150x150.png" alt="html code" title="html" width="150" height="150" style="float:left;margin:0 10px 10px 0" />Web sitenizden Ajax Control Toolkit HTML editör gibi bir editörden girilen html, css ve javascript içeren içeriklerden, belirli uzunluğa kadar kullanılan bölümleri temizleyip, SEO description olarak kullanmak, programatik yaratılan arama motoru optimizasyonlarında sıkça kullanılan bir yöntemdir.</p><p>Ancak description bölümünde herhangi bir kodun karışması sitenizin görüntüsünü ve çalışmasını olumsuz yönde etkileyecektir. Aşağıdaki kodu kullanarak html içeriklerinizi güvenilir çıplak bir metin içeriği haline getirebilirsiniz.</p><pre class="brush: cpp; title: ; notranslate">
private static string StripHTML(string source)
    {
        string result;
        result = source.Replace(&quot;\r&quot;, &quot; &quot;);
        result = result.Replace(&quot;\n&quot;, &quot; &quot;);
        result = result.Replace(&quot;\t&quot;, string.Empty);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;( )+&quot;, &quot; &quot;);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*head([^&gt;])*&gt;&quot;, &quot;&lt;head&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;(&lt;( )*(/)( )*head( )*&gt;)&quot;, &quot;&lt;/head&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(&lt;head&gt;).*(&lt;/head&gt;)&quot;, string.Empty,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*script([^&gt;])*&gt;&quot;, &quot;&lt;script&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;(&lt;( )*(/)( )*script( )*&gt;)&quot;, &quot;&lt;/script&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;(&lt;script&gt;).*(&lt;/script&gt;)&quot;, string.Empty,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*style([^&gt;])*&gt;&quot;, &quot;&lt;style&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;(&lt;( )*(/)( )*style( )*&gt;)&quot;, &quot;&lt;/style&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(&lt;style&gt;).*(&lt;/style&gt;)&quot;, string.Empty,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*td([^&gt;])*&gt;&quot;, &quot;\t&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*br( )*&gt;&quot;, &quot;\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*li( )*&gt;&quot;, &quot;\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*div([^&gt;])*&gt;&quot;, &quot;\r\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*tr([^&gt;])*&gt;&quot;, &quot;\r\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;( )*p([^&gt;])*&gt;&quot;, &quot;\r\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&lt;[^&gt;]*&gt;&quot;, string.Empty,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot; &quot;, &quot; &quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;bull;&quot;, &quot; * &quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;lsaquo;&quot;, &quot;&lt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;rsaquo;&quot;, &quot;&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;trade;&quot;, &quot;(tm)&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;frasl;&quot;, &quot;/&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;lt;&quot;, &quot;&lt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;gt;&quot;, &quot;&gt;&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;copy;&quot;, &quot;(c)&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;reg;&quot;, &quot;(r)&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,@&quot;&amp;(.{2,6});&quot;, string.Empty,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = result.Replace(&quot;\n&quot;, &quot;\r&quot;);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(\r)( )+(\r)&quot;, &quot;\r\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(\t)( )+(\t)&quot;, &quot;\t\t&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(\t)( )+(\r)&quot;, &quot;\t\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(\r)( )+(\t)&quot;, &quot;\r\t&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(\r)(\t)+(\r)&quot;, &quot;\r\r&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        result = System.Text.RegularExpressions.Regex.Replace(result,&quot;(\r)(\t)+&quot;, &quot;\r\t&quot;,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        string breaks = &quot;\r\r\r&quot;;
        string tabs = &quot;\t\t\t\t\t&quot;;
        for (int index = 0; index &lt; result.Length; index++)
        {
            result = result.Replace(breaks, &quot;\r\r&quot;);
            result = result.Replace(tabs, &quot;\t\t\t\t&quot;);
            breaks = breaks + &quot;\r&quot;;
            tabs = tabs + &quot;\t&quot;;
        }
        return result;
    }
</pre>]]></content:encoded> <wfw:commentRss>http://www.rizasirman.com/web_tasarim/asp-net/icerikten-html-kodu-temizleme-strip-html/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>URL Rewrite ve SEO İşlemleri İçin Güvenilir Metin</title><link>http://www.rizasirman.com/web_tasarim/asp-net/optimizasyon/url-rewrite-ve-seo-islemleri-icin-guvenilir-metin/</link> <comments>http://www.rizasirman.com/web_tasarim/asp-net/optimizasyon/url-rewrite-ve-seo-islemleri-icin-guvenilir-metin/#comments</comments> <pubDate>Fri, 03 Dec 2010 12:06:34 +0000</pubDate> <dc:creator>Rıza Sırman</dc:creator> <category><![CDATA[c#]]></category> <category><![CDATA[Optimizasyon]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[arama motoru optimizasyonu]]></category> <category><![CDATA[güvenilir metin]]></category> <category><![CDATA[safe-text]]></category> <category><![CDATA[seo]]></category><guid isPermaLink="false">http://www.rizasirman.com/?p=519</guid> <description><![CDATA[URL re-write, dosya yükleme ve yeniden isimlendirme işlemleri için kullandığınız kodlarda bu sayfadaki gibi bir string fonksiyonu kullanabilir, hem daha sağlıklı URL'ler elde edebilir hem de sisteminizi arama motoru dostu hale getirebilirsiniz.]]></description> <content:encoded><![CDATA[<p><img src="http://www.rizasirman.com/wp-content/uploads/2010/12/seo.png" alt="SEO" title="SEO" width="64" height="64" style="float:left;margin:10px 10px 0 0" />URL re-write, dosya yükleme ve yeniden isimlendirme işlemleri için kullandığınız kodlarda aşağıdaki gibi bir string fonksiyonu kullanabilir, hem daha sağlıklı URL&#8217;ler elde edebilir hem de sisteminizi arama motoru dostu hale getirebilirsiniz. Bir çok web sitemin uygulamasında kullandığım bu methodu aşağıda bulabilirsiniz.</p><p>Kod kısaca gelen string cümlesindeki sakıncalı karakterleri ortadan kaldırıp; türkçe karakterleri, eşleneği latin karakterleri ile değiştiriyor. Ardından bütün cümleyi küçük harflere çeviriyor.</p><pre class="brush: cpp; title: ; notranslate">
public static string SafeText(string IncomingText)
        {
            System.Globalization.CultureInfo Dil = new System.Globalization.CultureInfo(&quot;tr-TR&quot;);

            IncomingText = IncomingText.Replace(&quot;ş&quot;, &quot;s&quot;);
            IncomingText = IncomingText.Replace(&quot;Ş&quot;, &quot;s&quot;);
            IncomingText = IncomingText.Replace(&quot;İ&quot;, &quot;i&quot;);
            IncomingText = IncomingText.Replace(&quot;I&quot;, &quot;i&quot;);
            IncomingText = IncomingText.Replace(&quot;ı&quot;, &quot;i&quot;);
            IncomingText = IncomingText.Replace(&quot;ö&quot;, &quot;o&quot;);
            IncomingText = IncomingText.Replace(&quot;Ö&quot;, &quot;o&quot;);
            IncomingText = IncomingText.Replace(&quot;ü&quot;, &quot;u&quot;);
            IncomingText = IncomingText.Replace(&quot;Ü&quot;, &quot;u&quot;);
            IncomingText = IncomingText.Replace(&quot;Ç&quot;, &quot;c&quot;);
            IncomingText = IncomingText.Replace(&quot;ç&quot;, &quot;c&quot;);
            IncomingText = IncomingText.Replace(&quot;ğ&quot;, &quot;g&quot;);
            IncomingText = IncomingText.Replace(&quot;Ğ&quot;, &quot;g&quot;);
            IncomingText = IncomingText.Replace(&quot; &quot;, &quot;-&quot;);
            IncomingText = IncomingText.Replace(&quot;---&quot;, &quot;-&quot;);
            IncomingText = IncomingText.Replace(&quot;?&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;/&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;.&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;'&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;#&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;%&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;&amp;&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;*&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;!&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;@&quot;, &quot;&quot;);
            IncomingText = IncomingText.Replace(&quot;+&quot;, &quot;&quot;);

            IncomingText = IncomingText.ToLower();
            IncomingText = IncomingText.Trim();
            return IncomingText;
        }
</pre>]]></content:encoded> <wfw:commentRss>http://www.rizasirman.com/web_tasarim/asp-net/optimizasyon/url-rewrite-ve-seo-islemleri-icin-guvenilir-metin/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Deflate metoduyla http kompres ekleme</title><link>http://www.rizasirman.com/web_tasarim/asp-net/deflate-metoduyla-http-kompres-ekleme/</link> <comments>http://www.rizasirman.com/web_tasarim/asp-net/deflate-metoduyla-http-kompres-ekleme/#comments</comments> <pubDate>Mon, 08 Nov 2010 14:51:00 +0000</pubDate> <dc:creator>Rıza Sırman</dc:creator> <category><![CDATA[ASP.NET]]></category> <category><![CDATA[Optimizasyon]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[compress]]></category> <category><![CDATA[deflate]]></category> <category><![CDATA[gzip]]></category> <category><![CDATA[http compress]]></category> <category><![CDATA[kompres]]></category> <category><![CDATA[optimizasyon]]></category> <category><![CDATA[optimize]]></category> <category><![CDATA[performans]]></category><guid isPermaLink="false">http://www.rizasirman.com/?p=448</guid> <description><![CDATA[En meşhur http kompres yani sıkıştırma metodu bildiğiniz gibi gzip. Ancak deflate methodu daha çok sıkıştırma yapabiliyor ve daha performanslı çalışabiliyor. Konu hakkında aşağıdaki makaleyi okuyabilirsiniz. http://www.stardeveloper.com/articles/display.html?article=2008111201&#038;page=1 Sitenize deflate kompres eklemek için global.asax dosyanıza (sitenizde yoksa ekleyin) aşağıdaki kodları ekleyin. Böylece ziyaretçinin browser&#8217;ı deflate methodunu kabul ediyorsa deflate, etmiyorsa gzip, onu da kabul etmiyorsa kompres&#8230;]]></description> <content:encoded><![CDATA[<p>En meşhur http kompres yani sıkıştırma metodu bildiğiniz gibi gzip. Ancak deflate methodu daha çok sıkıştırma yapabiliyor ve daha performanslı çalışabiliyor. Konu hakkında aşağıdaki makaleyi okuyabilirsiniz.</p><p><a href="http://www.stardeveloper.com/articles/display.html?article=2008111201&#038;page=1" rel="external">http://www.stardeveloper.com/articles/display.html?article=2008111201&#038;page=1</a></p><p>Sitenize deflate kompres eklemek için global.asax dosyanıza (sitenizde yoksa ekleyin) aşağıdaki kodları ekleyin. Böylece ziyaretçinin browser&#8217;ı deflate methodunu kabul ediyorsa deflate, etmiyorsa gzip, onu da kabul etmiyorsa kompres etmeden sunucunuzdan gönderim yapılacaktır.</p><pre class="brush: cpp; title: ; notranslate">
&lt;%@ Application Language=&quot;C#&quot; %&gt;
&lt;%@ Import Namespace=&quot;System.IO&quot; %&gt;
&lt;%@ Import Namespace=&quot;System.IO.Compression&quot; %&gt;

&lt;script runat=&quot;server&quot;&gt;
void Application_PreRequestHandlerExecute(object sender, EventArgs e)
{
	HttpApplication app = sender as HttpApplication;
	string acceptEncoding = app.Request.Headers[&quot;Accept-Encoding&quot;];
	Stream prevUncompressedStream = app.Response.Filter;

	if (!(app.Context.CurrentHandler is Page ||
		app.Context.CurrentHandler.GetType().Name == &quot;SyncSessionlessHandler&quot;) ||
		app.Request[&quot;HTTP_X_MICROSOFTAJAX&quot;] != null)
		return;

	if (acceptEncoding == null || acceptEncoding.Length == 0)
		return;

	acceptEncoding = acceptEncoding.ToLower();

	if (acceptEncoding.Contains(&quot;deflate&quot;) || acceptEncoding == &quot;*&quot;)
	{
		// deflate
		app.Response.Filter = new DeflateStream(prevUncompressedStream,
			CompressionMode.Compress);
		app.Response.AppendHeader(&quot;Content-Encoding&quot;, &quot;deflate&quot;);
	} else if (acceptEncoding.Contains(&quot;gzip&quot;))
	{
		// gzip
		app.Response.Filter = new GZipStream(prevUncompressedStream,
			CompressionMode.Compress);
		app.Response.AppendHeader(&quot;Content-Encoding&quot;, &quot;gzip&quot;);
	}
}
&lt;/script&gt;
</pre>]]></content:encoded> <wfw:commentRss>http://www.rizasirman.com/web_tasarim/asp-net/deflate-metoduyla-http-kompres-ekleme/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Üretilen HTML kodunuzu minimize etme, boşlukları temizleme</title><link>http://www.rizasirman.com/web_tasarim/asp-net/uretilen-html-kodunuzu-minimize-etme-bosluklari-temizleme/</link> <comments>http://www.rizasirman.com/web_tasarim/asp-net/uretilen-html-kodunuzu-minimize-etme-bosluklari-temizleme/#comments</comments> <pubDate>Mon, 08 Nov 2010 14:01:54 +0000</pubDate> <dc:creator>Rıza Sırman</dc:creator> <category><![CDATA[ASP.NET]]></category> <category><![CDATA[Optimizasyon]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[boşluk temizleme]]></category> <category><![CDATA[html minimize]]></category> <category><![CDATA[optimizasyon]]></category><guid isPermaLink="false">http://www.rizasirman.com/?p=440</guid> <description><![CDATA[Bu optimizasyonu yapmak istediğiniz sayfaya ve/veya master page&#8217;inize aşağıdaki kodları ekleyin: Tabii ki namespace&#8217;inizi eklemeyi unutmayın: using System.Text.RegularExpressions;]]></description> <content:encoded><![CDATA[<p>Bu optimizasyonu yapmak istediğiniz sayfaya ve/veya master page&#8217;inize aşağıdaki kodları ekleyin:</p><pre class="brush: cpp; title: ; notranslate">
protected override void Render(HtmlTextWriter writer)
    {
        using (HtmlTextWriter htmlwriter = new HtmlTextWriter(new System.IO.StringWriter()))
        {
            base.Render(htmlwriter);
            string html = htmlwriter.InnerWriter.ToString();
            html = RemoveWhitespaceFromHtml(html);
            writer.Write(html);
        }
    }
    public static string RemoveWhitespaceFromHtml(string html)
    {
        html = RegexBetweenTags.Replace(html, &quot;&gt;&quot;);
        html = RegexLineBreaks.Replace(html, &quot;&lt;&quot;);
        return html.Trim();
    }
    private static readonly Regex RegexBetweenTags = new Regex(@&quot;&gt;(?! )\s+&quot;, RegexOptions.Compiled);
    private static readonly Regex RegexLineBreaks = new Regex(@&quot;([\n\s])+?(?&lt;= {2,})&lt;&quot;, RegexOptions.Compiled);
</pre><p>Tabii ki namespace&#8217;inizi eklemeyi unutmayın:</p><p>using System.Text.RegularExpressions;</p> ]]></content:encoded> <wfw:commentRss>http://www.rizasirman.com/web_tasarim/asp-net/uretilen-html-kodunuzu-minimize-etme-bosluklari-temizleme/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Statik içerik için cache ayarları</title><link>http://www.rizasirman.com/web_tasarim/asp-net/statik-icerik-icin-cache-ayarlari/</link> <comments>http://www.rizasirman.com/web_tasarim/asp-net/statik-icerik-icin-cache-ayarlari/#comments</comments> <pubDate>Mon, 08 Nov 2010 09:22:43 +0000</pubDate> <dc:creator>Rıza Sırman</dc:creator> <category><![CDATA[ASP.NET]]></category> <category><![CDATA[Optimizasyon]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[cache]]></category> <category><![CDATA[optimizasyon]]></category> <category><![CDATA[performans]]></category> <category><![CDATA[statik içerik]]></category><guid isPermaLink="false">http://www.rizasirman.com/?p=432</guid> <description><![CDATA[Firefox ve Firebug kullanarak sitenizin performansını yükseltmek istiyorsanız, Page Speed eklentisinde ilk göreceğiniz hatalardan biri şu olacaktır. Leverage browser caching başlığı altında]]></description> <content:encoded><![CDATA[<p>Firefox ve Firebug kullanarak sitenizin performansını yükseltmek istiyorsanız, Page Speed eklentisinde ilk göreceğiniz hatalardan biri şu olacaktır.</p><p>Leverage browser caching başlığı altında<br /> <The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources</pre><p>Bu hatanın tam anlamı şudur. Sitenizde kullanılan css, javascript ve resim dosyalarınızın ziyaretçinin bilgisayarında ne kadar süre cachleneceğinizi belirtmeniz gerekiyor. Asp.net ve IIS 7 sayesinde bunu web.config dosyanızın system.webserver bloğunda aşağıdaki kodlarla basitçe gerçekleştirebilir ve sitenizin performanısını kullandığınız statik içeriğin miktarı doğrultusunda %1-%5 gibi oranlarda arttırabilirsiniz.</p><pre class="brush: xml; title: ; notranslate">
&lt;staticContent&gt;
    &lt;clientCache cacheControlMaxAge=&quot;10.00:00:00&quot; cacheControlMode=&quot;UseMaxAge&quot; /&gt;
&lt;/staticContent&gt;
</pre><p>Bu kod ile statik içeriğin cache zamanını 10 gün olarak belirleyebilirsiniz.</p><pre class="brush: xml; title: ; notranslate">
&lt;staticContent&gt;
    &lt;clientCache httpExpires=&quot;Sun, 29 Mar 2020 00:00:00 GMT&quot; cacheControlMode=&quot;UseExpires&quot; /&gt;
&lt;/staticContent&gt;
</pre><p>Bu kod ile de sitenizin statik içeriğini 29 Mart 2020 tarihine cachelenebilir kılabilirsiniz.</p> ]]></content:encoded> <wfw:commentRss>http://www.rizasirman.com/web_tasarim/asp-net/statik-icerik-icin-cache-ayarlari/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic

Served from: www.rizasirman.com @ 2012-05-19 10:37:30 -->
