<?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>| Blogger Tips And Tricks|Latest Tips For Bloggers</title>
	<atom:link href="https://www.bloggertipandtrick.net/tutorials/cookies/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Blogger Tips And Tricks&#124;Latest Tips For Bloggers</description>
	<lastBuildDate>Mon, 28 Jul 2025 14:23:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>How to Change or Disable Blogger Cookies Notification</title>
		<link>https://www.bloggertipandtrick.net/change-blogger-cookies-notification/</link>
					<comments>https://www.bloggertipandtrick.net/change-blogger-cookies-notification/#comments</comments>
		
		<dc:creator><![CDATA[Lasantha Bandara]]></dc:creator>
		<pubDate>Sat, 19 Jul 2025 15:52:04 +0000</pubDate>
				<category><![CDATA[browser]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[java script]]></category>
		<guid isPermaLink="false">http://www.bloggertipandtrick.net/?p=6344</guid>

					<description><![CDATA[<p>Blogger automatically displays a cookies consent banner for European Union (EU) visitors to comply with GDPR regulations. This banner appears at the top of your blog and informs users that your site uses cookies, especially for Google services and personalized ads. If you're located outside the EU and want to preview the cookies notification, you [&#8230;]</p>
<p>The post <a href="https://www.bloggertipandtrick.net/change-blogger-cookies-notification/">How to Change or Disable Blogger Cookies Notification</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" src="https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/How-to-Change-or-Disable-Blogger-Cookies-Notification.jpg" alt="How to Change or Disable Blogger Cookies Notification" width="1536" height="806" class="singular-featured-image alignnone size-full wp-image-7280" srcset="https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/How-to-Change-or-Disable-Blogger-Cookies-Notification.jpg 1536w, https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/How-to-Change-or-Disable-Blogger-Cookies-Notification-768x403.jpg 768w" sizes="(max-width: 1536px) 100vw, 1536px" /></p>
<p>Blogger automatically displays a cookies consent banner for <strong>European Union (EU)</strong> visitors to comply with GDPR regulations. This banner appears at the top of your blog and informs users that your site uses cookies, especially for Google services and personalized ads.</p>
<p><a href="https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/Blogger-Cookies-Notification.png" target="_blank"><img decoding="async" src="https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/Blogger-Cookies-Notification.png" alt="Blogger Cookies Notification" width="1053" height="92" class="alignnone size-full wp-image-7283" srcset="https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/Blogger-Cookies-Notification.png 1053w, https://www.bloggertipandtrick.net/wp-content/uploads/2025/07/Blogger-Cookies-Notification-768x67.png 768w" sizes="(max-width: 1053px) 100vw, 1053px" /></a></p>
<p>If you're located outside the EU and want to preview the cookies notification, you can no longer use region-specific domains like <strong>.co.uk</strong> as they now redirect to <strong>.com</strong>.</p>
<p>Instead, use a VPN, browser extension, or an online tool like "GeoPeeker" to simulate a visit from an EU country. This allows you to see how the cookie banner appears to EU-based visitors, regardless of whether your blog uses a *.blogspot.com address or a custom domain.</p>
<p>The cookie banner in Blogger is automatically managed by Google and is designed to inform visitors about the use of cookies on your site. It highlights how Google uses cookies for services such as personalized advertising and traffic analysis, while also fulfilling the legal requirement to obtain user consent under GDPR regulations.</p>
<p>However, the default message may not align with your blog's tone or design, and some users choose to customize or disable it entirely. This should be done with caution, as it may lead to compliance risks.</p>
<h2>How to Change the Blogger Cookies Notification Message</h2>
<p>You can customize the cookie banner text and buttons. Go to the theme's "<strong>Edit HTML</strong>" page and add this code just before the <strong>&lt;/head&gt;</strong> tag:</p>
<pre style="border:1px solid black;overflow:auto;">&lt;script type=&quot;text/javascript&quot;&gt;
    cookieOptions = {
        msg: &quot;<span style='color:#ff0000'>This site uses cookies from Google to deliver its services, to personalize ads and to analyze traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.</span>&quot;,
        link: &quot;https://policies.google.com/technologies/cookies&quot;,
        close: &quot;Got it&quot;,
        learn: &quot;Learn More&quot;
    };
&lt;/script&gt;</pre>
<p><strong>Note:</strong> You need to change the <span style="color:#0cb30c;"><strong>msg</strong></span> text to better fit your blog's language or tone.</p>
<h2>How to Disable the Blogger Cookies Notification</h2>
<p><strong>Important:</strong> Use this <strong>only if</strong> you fully understand your region's legal responsibilities. Disabling the banner may lead to <strong>non-compliance</strong> with privacy laws like GDPR.</p>
<p>To completely disable the banner, add the following code just before the closing <strong>&lt;/head&gt;</strong> tag in your theme's Edit HTML page:</p>
<pre style="border:1px solid black;overflow:auto;">&lt;script type=&quot;text/javascript&quot;&gt;
    cookieOptions = {};
&lt;/script&gt;</pre>
<p><strong>Note:</strong> For most users, customizing the banner (rather than removing it) is the safest and most compliant choice.</p>
<p>For more information: <a href="https://support.google.com/blogger/answer/6253244" target="_blank" rel="nofollow">https://support.google.com/blogger/answer/6253244</a></p>
<p>The post <a href="https://www.bloggertipandtrick.net/change-blogger-cookies-notification/">How to Change or Disable Blogger Cookies Notification</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bloggertipandtrick.net/change-blogger-cookies-notification/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to Style Blogger Cookies Notification</title>
		<link>https://www.bloggertipandtrick.net/style-blogger-cookies-notification/</link>
					<comments>https://www.bloggertipandtrick.net/style-blogger-cookies-notification/#respond</comments>
		
		<dc:creator><![CDATA[Lasantha Bandara]]></dc:creator>
		<pubDate>Wed, 12 Jul 2017 10:25:49 +0000</pubDate>
				<category><![CDATA[browser]]></category>
		<category><![CDATA[cookies]]></category>
		<guid isPermaLink="false">http://www.bloggertipandtrick.net/?p=6517</guid>

					<description><![CDATA[<p>When someone visit to your blogger blog from a country of European Union, he/she will see a notice that contains information about cookies is used on your blog. If you are living in a non-EU country, you can see this notification changing the country code. For example change http://YOURBLOG.blogspot.com to http://YOURBLOG.blogspot.co.uk. It contains a message [&#8230;]</p>
<p>The post <a href="https://www.bloggertipandtrick.net/style-blogger-cookies-notification/">How to Style Blogger Cookies Notification</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When someone visit to your blogger blog from a country of European Union, he/she will see a notice that contains information about cookies is used on your blog. If you are living in a non-EU country, you can see this notification changing the country code. For example change http://YOURBLOG.blogspot.com to http://YOURBLOG.blogspot.co.uk. It contains a message similar to this:</p>
<p><a href="https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Blogger-Cookies-Notification.png" target="_blank" title="Blogger Cookies Notification"><img decoding="async" src="https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Blogger-Cookies-Notification.png" alt="Blogger Cookies Notification" width="1034" height="76" class="alignnone size-full wp-image-6518" srcset="https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Blogger-Cookies-Notification.png 1034w, https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Blogger-Cookies-Notification-768x56.png 768w" sizes="(max-width: 1034px) 100vw, 1034px" /></a></p>
<p>You can change the look of this Cookies Notification adding this code just before the <strong>&lt;/head&gt;</strong> tag of your blogger template.</p>
<pre style="border:1px solid black;overflow:auto;width:95%;">.cookie-choices-info {
    background-color: rgba(0, 0, 0, 0.9) !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 100000 !important;
}

.cookie-choices-info .cookie-choices-text {
    color: #fff !important;
    font-size: 10px !important;
    line-height: 1.2em !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.cookie-choices-info .cookie-choices-button {
    font-weight: 700 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10px !important;
    text-transform: none !important;
    color: #fff !important;
    background-color: #FF5722 !important;
    padding: 5px 10px !important;
    border-radius: 3px !important;
}</pre>
<p><strong>Note:</strong> You can change colors and fonts of the above code as you like.</p>
<p>Final result will be look like this:</p>
<p><a href="https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Modified-Blogger-Cookies-Notification.png" target="_blank" title="Modified Blogger Cookies Notification"><img loading="lazy" decoding="async" src="https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Modified-Blogger-Cookies-Notification.png" alt="Modified Blogger Cookies Notification" width="1034" height="73" class="alignnone size-full wp-image-6519" srcset="https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Modified-Blogger-Cookies-Notification.png 1034w, https://www.bloggertipandtrick.net/wp-content/uploads/2017/07/Modified-Blogger-Cookies-Notification-768x54.png 768w" sizes="auto, (max-width: 1034px) 100vw, 1034px" /></a></p>
<p>The post <a href="https://www.bloggertipandtrick.net/style-blogger-cookies-notification/">How to Style Blogger Cookies Notification</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bloggertipandtrick.net/style-blogger-cookies-notification/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Create a Cookie to Remember Visitors</title>
		<link>https://www.bloggertipandtrick.net/how-to-create-cookie-to-remember/</link>
					<comments>https://www.bloggertipandtrick.net/how-to-create-cookie-to-remember/#comments</comments>
		
		<dc:creator><![CDATA[Lasantha Bandara]]></dc:creator>
		<pubDate>Sat, 06 Jun 2009 08:10:00 +0000</pubDate>
				<category><![CDATA[cookies]]></category>
		<category><![CDATA[java script]]></category>
		<guid isPermaLink="false">http://www.bloggertipandtrick.net/2009/06/how-to-create-a-cookie-to-remember-visitors.html</guid>

					<description><![CDATA[<p>This script will prompt the user to enter his/her name, and remember and display it whenever the user returns. 1.Login to your dashboard--> layout- ->Page Elements 2.Click on 'Add a Gadget' on the sidebar. 3.Select 'HTML/Javascript' and add the code given below and click save. &#60;script&#62;&#60;!-- // Boolean variable specified if alert should be displayed [&#8230;]</p>
<p>The post <a href="https://www.bloggertipandtrick.net/how-to-create-cookie-to-remember/">How To Create a Cookie to Remember Visitors</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This script will prompt the user to enter his/her name, and remember and display it whenever the user returns.</p>
<p>1.Login to your dashboard--> layout- ->Page Elements</p>
<p>2.Click on 'Add a Gadget' on the sidebar.</p>
<p>3.Select 'HTML/Javascript' and add the code given below and click save.</p>
<p><center></p>
<table width="400" border="0" bgcolor="#cccd94">
<tbody>
<tr>
<td><center>&lt;script&gt;<br />&lt;!--</p>
<p>// Boolean variable specified if alert should be displayed if cookie exceeds 4KB<br />var caution = false</p>
<p>// name - name of the cookie<br />// value - value of the cookie<br />// [expires] - expiration date of the cookie (defaults to end of current session)<br />// [path] - path for which the cookie is valid (defaults to path of calling document)<br />// [domain] - domain for which the cookie is valid (defaults to domain of calling document)<br />// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission<br />// * an argument defaults when it is assigned null as a placeholder<br />// * a null placeholder is not required for trailing omitted arguments<br />function setCookie(name, value, expires, path, domain, secure) {<br />var curCookie = name + "=" + escape(value) +<br />((expires) ? "; expires=" + expires.toGMTString() : "") +<br />((path) ? "; path=" + path : "") +<br />((domain) ? "; domain=" + domain : "") +<br />((secure) ? "; secure" : "")<br />if (!caution || (name + "=" + escape(value)).length &lt;= 4000)<br />document.cookie = curCookie<br />else<br />if (confirm("Cookie exceeds 4KB and will be cut!"))<br />document.cookie = curCookie<br />}</p>
<p>// name - name of the desired cookie<br />// * return string containing value of specified cookie or null if cookie does not exist<br />function getCookie(name) {<br />var prefix = name + "="<br />var cookieStartIndex = document.cookie.indexOf(prefix)<br />if (cookieStartIndex == -1)<br />return null<br />var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)<br />if (cookieEndIndex == -1)<br />cookieEndIndex = document.cookie.length<br />return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))<br />}</p>
<p>// name - name of the cookie<br />// [path] - path of the cookie (must be same as path used to create cookie)<br />// [domain] - domain of the cookie (must be same as domain used to create cookie)<br />// * path and domain default if assigned null or omitted if no explicit argument proceeds<br />function deleteCookie(name, path, domain) {<br />if (getCookie(name)) {<br />document.cookie = name + "=" +<br />((path) ? "; path=" + path : "") +<br />((domain) ? "; domain=" + domain : "") +<br />"; expires=Thu, 01-Jan-70 00:00:01 GMT"<br />}<br />}</p>
<p>// date - any instance of the Date object<br />// * you should hand all instances of the Date object to this function for "repairs"<br />// * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn Advanced JavaScript Programming"<br />function fixDate(date) {<br />var base = new Date(0)<br />var skew = base.getTime()<br />if (skew &gt; 0)<br />date.setTime(date.getTime() - skew)<br />}</p>
<p>var now = new Date()<br />fixDate(now)<br />now.setTime(now.getTime() + 31 * 24 * 60 * 60 * 1000)<br />var name = getCookie("name")<br />if (!name)<br />name = prompt("Please enter your name:", "John Doe")<br />setCookie("name", name, now)<br />document.write("Hello " + name + "!")<br />//--&gt;<br />&lt;/script&gt;</center></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>Now you are done.Refresh site to see result.Look at the example below.</p>
<p><img decoding="async" style="cursor:pointer; cursor:hand;width: 329px; height: 147px;" src="https://1.bp.blogspot.com/_-j7_-ccACuU/SiofohoCgOI/AAAAAAAAAbY/5Mfxjr0svc4/s400/cookie22.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5344118688910049506" /></p>
<p>The post <a href="https://www.bloggertipandtrick.net/how-to-create-cookie-to-remember/">How To Create a Cookie to Remember Visitors</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bloggertipandtrick.net/how-to-create-cookie-to-remember/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>A Cookie to display the number of times Visit-2</title>
		<link>https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit_06/</link>
					<comments>https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit_06/#respond</comments>
		
		<dc:creator><![CDATA[Lasantha Bandara]]></dc:creator>
		<pubDate>Sat, 06 Jun 2009 07:57:00 +0000</pubDate>
				<category><![CDATA[cookies]]></category>
		<category><![CDATA[java script]]></category>
		<guid isPermaLink="false">http://www.bloggertipandtrick.net/2009/06/a-cookie-to-display-the-number-of-times-visit-2.html</guid>

					<description><![CDATA[<p>This script keeps track of the number of times a surfer has visited your page, and alerts the surfer of this info. 1.Login to your dashboard--> layout- ->Page Elements 2.Click on 'Add a Gadget' on the sidebar. 3.Select 'HTML/Javascript' and add the code given below and click save. &#60;SCRIPT LANGUAGE="JavaScript"&#62; function getCookieVal (offset) {var endstr [&#8230;]</p>
<p>The post <a href="https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit_06/">A Cookie to display the number of times Visit-2</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This script keeps track of the number of times a surfer has visited your page, and alerts the surfer of this info.</p>
<p>1.Login to your dashboard--> layout- ->Page Elements</p>
<p>2.Click on 'Add a Gadget' on the sidebar.</p>
<p>3.Select 'HTML/Javascript' and add the code given below and click save.</p>
<p><center></p>
<table width="400" border="0" bgcolor="#cccd94">
<tbody>
<tr>
<td><center>&lt;SCRIPT LANGUAGE="JavaScript"&gt;</p>
<p>function getCookieVal (offset) {<br />var endstr = document.cookie.indexOf (";", offset);<br />if (endstr == -1)<br />endstr = document.cookie.length;<br />return unescape(document.cookie.substring(offset, endstr));<br />}<br />function GetCookie (name) {<br />var arg = name + "=";<br />var alen = arg.length;<br />var clen = document.cookie.length;<br />var i = 0;<br />while (i &lt; clen) {<br />var j = i + alen;<br />if (document.cookie.substring(i, j) == arg)<br />return getCookieVal (j);<br />i = document.cookie.indexOf(" ", i) + 1;<br />if (i == 0)<br />break;<br />}<br />return null;<br />}<br />function SetCookie (name, value) {<br />var argv = SetCookie.arguments;<br />var argc = SetCookie.arguments.length;<br />var expires = (2 &lt; argc) ? argv[2] : null;<br />var path = (3 &lt; argc) ? argv[3] : null;<br />var domain = (4 &lt; argc) ? argv[4] : null;<br />var secure = (5 &lt; argc) ? argv[5] : false;<br />document.cookie = name + "=" + escape (value) +<br />((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +<br />((path == null) ? "" : ("; path=" + path)) +<br />((domain == null) ? "" : ("; domain=" + domain)) +<br />((secure == true) ? "; secure" : "");<br />}<br />function DisplayInfo() {<br />var expdate = new Date();<br />var visit;<br />expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365));<br />if(!(visit = GetCookie("visit")))<br />visit = 0;<br />visit++;<br />SetCookie("visit", visit, expdate, "/", null, false);<br />var message;<br />if(visit == 1)<br />message="         Welcome to my page!";<br />if(visit== 2)<br />message="           I see you came back !";<br />if(visit == 3)<br />message="               Oh, it's you again!";<br />if(visit == 4)<br />message="            You must be curious!";<br />if(visit == 5)<br />message="      You're practically a regular!";<br />if(visit == 6)<br />message="              You need a hobby!";<br />if(visit == 7)<br />message="             Nothing better to do?";<br />if(visit == 8)<br />message="            Don't you ever sleep?";<br />if(visit == 9)<br />message="                      Get a life!!!";<br />if(visit &gt;= 10)<br />message="  Rent is due on the 1st of the month!";<br />alert("\n"+"Your browser has visited this page               \n"<br />         +"                              "+visit+"\n"<br />         +"                          time(s)."+"\n"+"\n"<br />         +message);<br />}<br />function ResetCounts() {<br />var expdate = new Date();<br />expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365));<br />visit = 0;<br />SetCookie("visit", visit, expdate , "/", null, false);<br />history.go(0);<br />}</p>
<p>window.onload=DisplayInfo<br />&lt;/Script&gt;</center></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>Now you are done.Refresh your site to see result.Look at the example below.</p>
<p><img decoding="async" style="cursor:pointer; cursor:hand;width: 322px; height: 169px;" src="https://2.bp.blogspot.com/_-j7_-ccACuU/Sioc_KqlXpI/AAAAAAAAAbQ/PEkZsWElYMo/s400/cookie111.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5344115779348815506" /></p>
<p>The post <a href="https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit_06/">A Cookie to display the number of times Visit-2</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit_06/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A Cookie to display the number of times Visit-1</title>
		<link>https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit/</link>
					<comments>https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit/#respond</comments>
		
		<dc:creator><![CDATA[Lasantha Bandara]]></dc:creator>
		<pubDate>Sat, 06 Jun 2009 07:49:00 +0000</pubDate>
				<category><![CDATA[cookies]]></category>
		<category><![CDATA[java script]]></category>
		<guid isPermaLink="false">http://www.bloggertipandtrick.net/2009/06/a-cookie-to-display-the-number-of-times-visit-1.html</guid>

					<description><![CDATA[<p>The below script uses cookies to display the number of times a (each) user has visited your page. 1.Login to your dashboard--> layout- ->Page Elements 2.Click on 'Add a Gadget' on the sidebar. 3.Select 'HTML/Javascript' and add the code given below and click save. &#60;SCRIPT&#62;function GetCookie (name) {var arg = name + "=";var alen = [&#8230;]</p>
<p>The post <a href="https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit/">A Cookie to display the number of times Visit-1</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The below script uses cookies to display the number of times a (each) user has visited your page.</p>
<p>1.Login to your dashboard--> layout- ->Page Elements</p>
<p>2.Click on 'Add a Gadget' on the sidebar.</p>
<p>3.Select 'HTML/Javascript' and add the code given below and click save.</p>
<p><center></p>
<table width="400" border="0" bgcolor="#cccd94">
<tbody>
<tr>
<td><center>&lt;SCRIPT&gt;<br />function GetCookie (name) {<br />var arg = name + "=";<br />var alen = arg.length;<br />var clen = document.cookie.length;<br />var i = 0;<br />while (i &lt; clen) {<br />var j = i + alen;<br />if (document.cookie.substring(i, j) == arg)<br />return getCookieVal (j);<br />i = document.cookie.indexOf(" ", i) + 1;<br />if (i == 0) break;<br />}<br />return null;<br />}<br />function SetCookie (name, value) {<br />var argv = SetCookie.arguments;<br />var argc = SetCookie.arguments.length;<br />var expires = (argc &gt; 2) ? argv[2] : null;<br />var path = (argc &gt; 3) ? argv[3] : null;<br />var domain = (argc &gt; 4) ? argv[4] : null;<br />var secure = (argc &gt; 5) ? argv[5] : false;<br />document.cookie = name + "=" + escape (value) +<br />((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +<br />((path == null) ? "" : ("; path=" + path)) +<br />((domain == null) ? "" : ("; domain=" + domain)) +<br />((secure == true) ? "; secure" : "");<br />}<br />function DeleteCookie (name) {<br />var exp = new Date();<br />exp.setTime (exp.getTime() - 1);<br />var cval = GetCookie (name);<br />document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();<br />}<br />var expDays = 30;<br />var exp = new Date();<br />exp.setTime(exp.getTime() + (expDays*24*60*60*1000));<br />function amt(){<br />var count = GetCookie('count')<br />if(count == null) {<br />SetCookie('count','1')<br />return 1<br />}<br />else {<br />var newcount = parseInt(count) + 1;<br />DeleteCookie('count')<br />SetCookie('count',newcount,exp)<br />return count<br />}<br />}<br />function getCookieVal(offset) {<br />var endstr = document.cookie.indexOf (";", offset);<br />if (endstr == -1)<br />endstr = document.cookie.length;<br />return unescape(document.cookie.substring(offset, endstr));<br />}<br />&lt;/SCRIPT&gt;<br />&lt;SCRIPT&gt;<br />document.write("You've been here &lt;b&gt;" + amt() + "&lt;/b&gt; times.")<br />&lt;/SCRIPT&gt;</center></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>Now you are done.Refresh site to see result.</p>
<p>The post <a href="https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit/">A Cookie to display the number of times Visit-1</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bloggertipandtrick.net/cookie-to-display-number-of-times-visit/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Create Cookie to Display time of last visit</title>
		<link>https://www.bloggertipandtrick.net/how-to-create-cookie-to-display-time-of/</link>
					<comments>https://www.bloggertipandtrick.net/how-to-create-cookie-to-display-time-of/#respond</comments>
		
		<dc:creator><![CDATA[Lasantha Bandara]]></dc:creator>
		<pubDate>Sat, 06 Jun 2009 03:32:00 +0000</pubDate>
				<category><![CDATA[cookies]]></category>
		<category><![CDATA[java script]]></category>
		<guid isPermaLink="false">http://www.bloggertipandtrick.net/2009/06/how-to-create-cookie-to-display-time-of-last-visit.html</guid>

					<description><![CDATA[<p>This script records the date+time of your visitor's last visit and displays it upon their return. If this is their first visit to your site, a greeting message is shown instead. You can customize the messages to display in each case. 1.Login to your dashboard--> layout- ->Page Elements 2.Click on 'Add a Gadget' on the [&#8230;]</p>
<p>The post <a href="https://www.bloggertipandtrick.net/how-to-create-cookie-to-display-time-of/">How To Create Cookie to Display time of last visit</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This script records the date+time of your visitor's last visit and displays it upon their return. If this is their first visit to your site, a greeting message is shown instead. You can customize the messages to display in each case.</p>
<p>1.Login to your dashboard--> layout- ->Page Elements</p>
<p>2.Click on 'Add a Gadget' on the sidebar.</p>
<p>3.Select 'HTML/Javascript' and add the code given below and click save.</p>
<p><center></p>
<table width="400" border="0" bgcolor="#cccd94">
<tbody>
<tr>
<td><center>&lt;script type = "text/javascript"&gt;</p>
<p>var days = 730; // days until cookie expires = 2 years.<br />var lastvisit=new Object();<br />var firstvisitmsg="This is your first visit to this page. Welcome!";<br />lastvisit.subsequentvisitmsg="Welcome back visitor! Your last visit was on &lt;b&gt;[displaydate]&lt;/b&gt;";</p>
<p>lastvisit.getCookie=function(Name){<br />var re=new RegExp(Name+"=[^;]+", "i");<br />if (document.cookie.match(re))<br />return document.cookie.match(re)[0].split("=")[1];<br />return'';<br />}</p>
<p>lastvisit.setCookie=function(name, value, days){<br />var expireDate = new Date();</p>
<p>var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days));<br />document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";<br />}</p>
<p>lastvisit.showmessage = function() {<br />var wh = new Date();<br />if (lastvisit.getCookie("visitc") == "") {<br />lastvisit.setCookie("visitc", wh, days);<br />document.write(firstvisitmsg);<br />}</p>
<p>else {<br />var lv = lastvisit.getCookie("visitc");<br />var lvp = Date.parse(lv);<br />var now = new Date();<br />now.setTime(lvp);<br />var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");<br />var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");<br />var dd = now.getDate();<br />var dy = now.getDay();<br />dy = day[dy];<br />var mn = now.getMonth();<br />mn = month[mn];<br />yy = now.getFullYear();<br />var hh = now.getHours();<br />var ampm = "AM";<br />if (hh &gt;= 12) {ampm = "PM"}<br />if (hh &gt;12){hh = hh - 12};<br />if (hh == 0) {hh = 12}<br />if (hh &lt; 10) {hh = "0" + hh};<br />var mins = now.getMinutes();<br />if (mins &lt; 10) {mins = "0"+ mins}<br />var secs = now.getSeconds();<br />if (secs &lt; 10) {secs = "0" + secs}<br />var dispDate = dy + ", " + mn + " " + dd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm<br />document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", dispDate))<br />}</p>
<p>lastvisit.setCookie("visitc", wh, days);</p>
<p>}</p>
<p>lastvisit.showmessage();</p>
<p>&lt;/script&gt;</center></td>
</tr>
</tbody>
</table>
<p></center></p>
<p>Now you are done.Refresh your site to see result.</p>
<p>The post <a href="https://www.bloggertipandtrick.net/how-to-create-cookie-to-display-time-of/">How To Create Cookie to Display time of last visit</a> appeared first on <a href="https://www.bloggertipandtrick.net">Blogger Tips And Tricks|Latest Tips For Bloggers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bloggertipandtrick.net/how-to-create-cookie-to-display-time-of/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
