Tips to speed your website

While more and more people are getting access to high speed internet, there are many left on dial up. Be kind to those visitors and do a few, simple things to speed up your webpages. Think the speed of your website doesn’t matter? Think again…

A 1-second delay in page load time yields:

  • 11% fewer page views
  • 16% decrease in customer satisfaction

A study found that:

  • 47% of people expect a web page to load in two seconds or less.
  • 40% will abandon a web page if it takes more than three seconds to load.
  • 52% of online shoppers say quick page loads are important for their loyalty to a site.

Here are some tips you can use to speed up your website:

  • Minimize HTTP Requests
  1. 80% of a Web page’s load time is spent downloading the different pieces-parts of the page: images, stylesheets, scripts, Flash, etc. An HTTP request is made for each one of these elements, so the more on-page components, the longer it takes for the page to render.
  2. That being the case, the quickest way to improve site speed is to simplify your design.
  3. Streamline the number of elements on your page.
  4. Use CSS instead of images whenever possible.
  5. Combine multiple style sheets into one.
  6. Reduce scripts and put them at the bottom of the page.
  • Enable compression
  1. Most web servers can compress files in Gzip format before sending them for download, either by calling a third-party module or using built-in routines
  2. IIS: Configure HTTP Compression: add this line to your web.config: <urlCompression doStaticCompression=”false” doDynamicCompression=”false” /> or enable IIS compression on your webserver.
  • Enable browser caching
  1. When you visit a website, the elements on the page you visit are stored on your hard drive in a cache, or temporary storage, so the next time you visit the site, your browser can load the page without having to send another HTTP request to the server.
  2. Use:
    • In page headers: <%@ OutputCache Duration=”60″ VaryByParam=“*” %>
    • In web.config: <staticContent><clientCache cacheControlMode=”UseMaxAge” cacheControlMaxAge=”30.00:00:00″ /></staticContent>
    • Cache your data in the code behind
  • Minify Resources
  1. When you visit a website, the elements on the page you visit are stored on your hard drive in a cache, or temporary storage, so the next time you visit the site, your browser can load the page without having to send another HTTP request to the server.
  2. Minify CSS: Remove comments and sources from CSS files, and combine CSS files. Optimize the CSS files and avoid redundancy in styles.Code- Group Selectors with Common Declarations 2016-04-01 01-23-56
  3. Minify JavaScript using the compression tools to get the minimum file size possible:JSMIN, The JavaScript Minifier 2016-04-01 01-27-03
  4. Minify HTML
  • Too Much White Space Isn’t Good,  collapse whitespaces
  • Omit Redundant Tags and Attributes
  • Use Descriptive ALT Values
  • Use Less Meta Tags
  • Remove All Comments
  • Don’t Use Complex Tables and Reduce the number of nested tables
  • Use Name Colours Rather Than Hex
  • Ensure All Tags are Closed
  • Reduce ViewState
  • Optimize images
  1. The images on your site can take up a lot of bandwidth, which affects the loading time of your page.
  2. Set Image Resolution to 72dpi
  3. Optimize GIF, JPG, PNG files
  4. Link Thumbnails to Larger Images
  5. Use Proper Image Formats
  6. Use Styled Text Instead of Graphic Text
  7. Don’t Scale Images
  8. The Fewer Graphics the Better
  • Optimize CSS Delivery
  1. CSS holds the style requirements for your page. Generally, your website accesses this information in one of two ways: in an external file, which loads before your page renders, and inline, which is inserted in the HTML document itself.
  2. The external CSS is loaded in the head of your HTML with code that looks something like this:<link rel=”stylesheet” type=”text/css” media=”all” href=http://yourURL/style.css />inline-css-example
  • Reduce the number of plugins you use on your site
  1. Too many plugins slow your site, create security issues, and often cause crashes and other technical difficulties.
  2. Remove social network buttons
  3. Consider lazyloading — or on-demand content



Add a watermark to an image uploaded in CKEditor

Adding watermarks to uploaded images is a much sought after feature in many media and news agency websites. There is an easy way to add a watermark to an image uploaded in any website using CKEditor.

Here is the method to add a watermark to an image uploaded via CKFinder. There is a plugin in CKFinder called watermark which needs to be configured before we can use it. Follow the steps below to configure it.

In the SetupCKEditor Method:

public override void SetConfig()
Plugins = new string[] {
“CKFinder.Plugins.Watermark, CKFinder_Watermark”
// Settings for extra plugins.
PluginSettings = new Hashtable();
PluginSettings.Add(“ImageResize_smallThumb”, “90×90” );
PluginSettings.Add(“ImageResize_mediumThumb”, “120×120” );
PluginSettings.Add(“ImageResize_largeThumb”, “180×180” );

// Name of the watermark image in plugins/watermark folder
PluginSettings.Add(“Watermark_source”, “logo.gif”);
//if the watermark alignment is to the right:
PluginSettings.Add(“Watermark_marginRight”, “10”);
//if the watermark alignment is to the left:
PluginSettings.Add(“Watermark_marginLeft”, “5”);
PluginSettings.Add(“Watermark_marginBottom”, “5” );
PluginSettings.Add(“Watermark_quality”, “90” );
PluginSettings.Add(“Watermark_transparency”, “80” );


Now after you enabled the watermark feature inside the CKEditor: you can add the “CKFinder_Watermark.dll” to your application to start using this feature. I adjusted the dll to allow the user to choose the position of the watermark: (right, left, top, bottom, transparency…)

using System;
using System.Text;
using System.IO;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Web;
using System.Web.UI;
using System.Collections;

namespace CKFinder.Plugins
public class Watermark : CKFinder.CKFinderPlugin
public string JavascriptPlugins
get { return “”; }

public void Init(CKFinder.Connector.CKFinderEvent CKFinderEvent)
CKFinderEvent.AfterFileUpload += new CKFinder.Connector.CKFinderEvent.Hook(CKFinderEvent_AfterFileUpload);

if (!CKFinder.Connector.Config.Current.PluginSettings.ContainsKey(“Watermark_source”))
CKFinder.Connector.Config.Current.PluginSettings[“Watermark_source”] = “logo.gif”;
if (!CKFinder.Connector.Config.Current.PluginSettings.ContainsKey(“Watermark_marginRight”))
CKFinder.Connector.Config.Current.PluginSettings[“Watermark_marginRight”] = “0”;
if (!CKFinder.Connector.Config.Current.PluginSettings.ContainsKey(“Watermark_marginLeft”))
CKFinder.Connector.Config.Current.PluginSettings[“Watermark_marginLeft”] = “0”;
if (!CKFinder.Connector.Config.Current.PluginSettings.ContainsKey(“Watermark_marginBottom”))
CKFinder.Connector.Config.Current.PluginSettings[“Watermark_marginBottom”] = “5”;
if (!CKFinder.Connector.Config.Current.PluginSettings.ContainsKey(“Watermark_quality”))
CKFinder.Connector.Config.Current.PluginSettings[“Watermark_quality”] = “90”;
if (!CKFinder.Connector.Config.Current.PluginSettings.ContainsKey(“Watermark_transparency”))
CKFinder.Connector.Config.Current.PluginSettings[“Watermark_transparency”] = “80”;

private void CKFinderEvent_AfterFileUpload(object sender, CKFinder.Connector.CKFinderEventArgs e)
if (!File.Exists((string)[1]))
catch { }

private void CreateWatermark(string sourceFile)
string logoImageName = (string)CKFinder.Connector.Config.Current.PluginSettings[“Watermark_source”];
string logoImageFile = logoImageName;

//search watermark image
if (!File.Exists(logoImageFile))
if (File.Exists(HttpContext.Current.Server.MapPath(logoImageFile)))
logoImageFile = HttpContext.Current.Server.MapPath(logoImageFile);
logoImageFile = HttpContext.Current.Server.MapPath(((Page)HttpContext.Current.Handler).ResolveUrl(“~/ckfinder/plugins/watermark/” + logoImageName));
if (!File.Exists(logoImageFile))
logoImageFile = HttpContext.Current.Server.MapPath(((Page)HttpContext.Current.Handler).ResolveUrl(“ckfinder/plugins/waterrmark/” + logoImageName));
if (!File.Exists(logoImageFile))

//load configuration
int marginBottom = 0, marginRight = 0, marginLeft = 0, transparency = 0;
int.TryParse((string)CKFinder.Connector.Config.Current.PluginSettings[“Watermark_marginBottom”], out marginBottom);
int.TryParse((string)CKFinder.Connector.Config.Current.PluginSettings[“Watermark_marginRight”], out marginRight);
int.TryParse((string)CKFinder.Connector.Config.Current.PluginSettings[“Watermark_marginLeft”], out marginLeft);
if (int.TryParse((string)CKFinder.Connector.Config.Current.PluginSettings[“Watermark_transparency”], out transparency))
if (transparency > 100) transparency = 100;
if (transparency < 0) transparency = 0;
transparency = transparency * 255 / 100;
else transparency = 255;

//load bitmaps
Image sourceImage = new Bitmap(sourceFile);
Bitmap destinationBmp = new Bitmap(sourceImage.Width, sourceImage.Height);
Bitmap logoImage = new Bitmap(logoImageFile);
Graphics graphics = Graphics.FromImage(destinationBmp);

//convert to indexes image
Bitmap bitmapImage = CreateNonIndexedImage(logoImage);

//set transparency
for (int i = 0; i < logoImage.Width; i++)
for (int j = 0; j < logoImage.Height; j++)
Color logoImagePixel = logoImage.GetPixel(i, j);
if (logoImagePixel.A != 0)
bitmapImage.SetPixel(i, j, Color.FromArgb(transparency, logoImagePixel));

//resize watermark – if is necessary
if (logoImage.Width > sourceImage.Width || logoImage.Height > sourceImage.Height)
bitmapImage = resizeImage(logoImage,
new Size(logoImage.Width > sourceImage.Width ? sourceImage.Width : logoImage.Width,
logoImage.Height > sourceImage.Height ? sourceImage.Height : logoImage.Height));
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
System.Drawing.Imaging.ImageFormat sourceImageFormat = sourceImage.RawFormat;
graphics.DrawImage(sourceImage, new PointF(0, 0));

if (marginLeft > 0)
graphics.DrawImage(bitmapImage, marginLeft, sourceImage.Height – bitmapImage.Height – marginBottom);
graphics.DrawImage(bitmapImage, sourceImage.Width – bitmapImage.Width – marginRight, sourceImage.Height – bitmapImage.Height – marginBottom);

//Dispose objects
destinationBmp.Save(sourceFile, sourceImageFormat);

private Bitmap resizeImage(Image imgToResize, Size size)
int sourceWidth = imgToResize.Width;
int sourceHeight = imgToResize.Height;
float nPercent = 0;
float nPercentW = nPercentW = ((float)size.Width / (float)sourceWidth);
float nPercentH = nPercentH = ((float)size.Height / (float)sourceHeight);
nPercent = nPercentH < nPercentW ? nPercentH : nPercentW;

int destWidth = (int)(sourceWidth * nPercent);
int destHeight = (int)(sourceHeight * nPercent);

Bitmap bitmap = new Bitmap(destWidth, destHeight);
Graphics graphics = Graphics.FromImage((Image)bitmap);
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.DrawImage(imgToResize, 0, 0, destWidth, destHeight);
return bitmap;

private Bitmap CreateNonIndexedImage(Bitmap src)
Bitmap newBmp = new Bitmap(src.Width, src.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
using (Graphics gfx = Graphics.FromImage(newBmp))
gfx.DrawImage(src, 0, 0);
return newBmp;

Now after applying all these options, whenever the user upload any image into the CKEditor, the selected watermark will be displayed in the position he specified.

To download the original file for the CKFinder_Watermark.dll you can use the link below:

Or more details on the CKEditor plugins:

Team Foundation Server 2015

On August 6, 2015 the newest version of the Team Foundation Server (TFS) was released with the collaboration platform at the core of Microsoft’s application lifecycle management (ALM) solution.

You can install Team Foundation Server from the following link.

Download:   Team Foundation Server 2015 RTM

Basic license expanded

The following features are now available to all Team Foundation Server users with a “Basic” license:

  • Web-based test execution
  • Agile portfolio management
  • Work item chart authoring
  • Team Rooms

What this means: All teams of five or fewer members with a “Basic” license have access to these features using Team Web Access for free, while larger teams can access this functionality at a much lower price point.

Changes to schema in databases

Team Foundation Server 2015 includes a large number of changes to the schema used in its databases, and as such, an upgrade from TFS 2013 and older releases is expected to take a significant amount of time. Because upgrades are offline, Microsoft is providing a tool, TfsPreUpgrade.exe, which can be used to perform the most time-expensive portions of the upgrade online against TFS 2013 QU4 and QU5 deployments. The Upgrade wizard includes a readiness check, which warns you if your database is large enough that running TfsPreUpgrade.exe is recommended.

SharePoint Extensions

In the past, if you wanted your Team Foundation Server integrated with a SharePoint instance that was on a different machine, you could either run the Team Foundation Server installer on the SharePoint server and then configure TFS Extensions for SharePoint or run a special installer (tfs_sharePointExtensions.exe) that put only the bits necessary for configuring TFS Extensions for SharePoint.

We have removed this special installer, so to integrate your Team Foundation Server with SharePoint, you must run the Team Foundation Server installer on the SharePoint server and then configure TFS Extensions for SharePoint.

More details about TFS 2015

Akkar District – Lebanon

Akkar (Arabic: عكار‎) is a district (Qadaa) in the North Governorate, Lebanon. It covers an area of 788 km2 (304 sq mi) and has a population of 198,174. The capital lies at Halba. The name Akkar is derived from the Syriac word, Akkare, meaning farmers.

The district is characterized by the presence of a 20150426_125941 (1024x576)relatively large coastal plain, with high mountains to the east. Akkar had been governed during the last 400 years by the Emirs and the beiks of the Merheb (Muriby) family. After the civil war this was no longer the case as peasants took over the land with the aid of Syrian troops during the civil war. The largest cities in Akkar are Halba, al-Bireh (previously called “Biret el Hokem” where we find the Castle of Merheb Family), Kobayat (Quobayet).

Akkar has many important Roman and Arabic archaeological sites. One of the most famous archaeological sites and the birthplace of the Emperor Alexander Severus, is the Tell of Arqa near the town of Miniara. Several prehistoric sites were found in the Akkar plain foothills that were suggested to have been used by the Heavy Neolithic Qaraoun culture at the dawn of the Neolithic revolution.

If you haven’t been there, have a look on all the green places all over Akkar. It should be considered one of the most important reserves in Lebanon.

10 reasons to visit Armenia

Discover the most ancient, mysterious and at the same time a modern country!

10  reasons to visit Armenia:12

1. MOUNT ARARAT and lake Sevan

To see the most beautiful mountain in the world – biblical Mount Ararat, the highest mountain in the world from its base (not sea level), where the Noah’s ark landed after the Great Flood and the second highest lake in the world after Titikaka!


Armenia is the first country in the world which officially adopted Christianity in 301, 24 years earlier than Rome. The first Christian church of the world (301-303) is located in Armenia.It means here you’ll see the world’s oldest churches and monasteries located in stunning natural settings.

3. WORLD’S OLDEST SHOE and oldest stonehenge in the world

To see the world’s oldest shoe (5500years old), as well as world’s oldest winery found in Areni Cave and 8000 year old Stonehenge located in the South part of Armenia.223 large stone tombs are standing here waiting for explorers.


To taste the Armenian pomegranate  wine and the most sophisticated Armenian cognac which is the visit card of Armenia.


To eat healthy, organic and delicious food as the Armenian cuisine is one of the oldest and tastiest in the world and to taste the sun-kissed apricots of Ararat Valley. “Prunus armeniaca” in Latin means “Armenian plum” as Armenia is the homeland of the apricot, the only fruit containing gold in its composition.


To ride the world’s longest aerial tramway (5.7km), “Tatev wings” which will take you to the huge monastic complex of Tatev (10th century), indeed a fairy-tale fortress – monastery nestled on a promontory surrounded by deep gorges.



To stand on the old Silk Road, its bridges and see caravanserais (hotels of antiquity). The Silk Road was about 7000km long, and 500km passed through Armenia.


You will be amazed by the diversity of landscapes of this small, yet ancient country with over 5000 year history. From semi deserts up to the alpine meadows, snow-capped peaks  and white sand beaches of the Lake Sevan, the lush forests of Dilijan or the huge red rocks of Noravank Canyon where we can organize incentive for you from A to Z.

10.  YEREVAN day and night life

To visit one of the world’s ancient continuously inhabited cities – Yerevan, the pink-colored capital of Armenia founded in 782 B.C. It’s called so because most of its building were built  by the local pink rock (tuff) quarried in Armenia. Erebuni (Yerevan) fortress is 29years older than Rome.This historical city becomes quite another place of ineterst during the night.Bars,Discotecs and casonies are waiting for you to enjoy and have unforgettable time. 21

Serendipity Happens…

Here are some quotes from my favorite movie – like to remember from time to time..

Jonathan Trager, prominent television producer for ESPN, died last night from complications of losing his soul mate and his fiancee. He was 35 years old. Soft-spoken and obsessive, Trager never looked the part of a hopeless romantic. But, in the final days of his life, he revealed an unknown side of his psyche. This hidden quasi-Jungian persona surfaced during the Agatha Christie-like pursuit of his long reputed soul mate, a woman whom he only spent a few precious hours with. Sadly, the protracted search ended late Saturday night in complete and utter failure. Yet even in certain defeat, the courageous Trager secretly clung to the belief that life is not merely a series of meaningless accidents or coincidences. Uh-uh. But rather, its a tapestry of events that culminate in an exquisite, sublime plan. Asked about the loss of his dear friend, Dean Kansky, the Pulitzer Prize-winning author and executive editor of the New York Times, described Jonathan as a changed man in the last days of his life. “Things were clearer for him,” Kansky noted. Ultimately Jonathan concluded that if we are to live life in harmony with the universe, we must all possess a powerful faith in what the ancients used to call “fatum”, what we currently refer to as destiny.

Jonathan: Maybe the absence of signs is a sign.


Jonathan: This is the ultimate blend to drink. How’d you find this place?

Sara: I first came in because of the name: Serendipity. It’s one of my favorite words.

Jonathan: It is? Why?

Sara: It’s such a nice sounding word for what it means: a fortunate accident.


Sara: You don’t have to understand. You just have to have faith.

Jonathan: Faith in what?

Sara: Destiny


read more

What will happen to my Facebook account if I die?

I always wondered what will ever happen to my Facebook account if I die accidentally or just die after a period of time. Statistics said in 2065, Facebook will have more dead people than live ones! This is strange, I keep on updating my profile with pictures every now and then and suddenly I disappear. This question popped a lot to my mind, and I was amazed with the results Facebook made.

Facebook has something called Memorialization Request!  Here what I find:

From Facebook’s FAQ:

It is our policy to memorialize all deceased users’ accounts on the site. When an account is memorialized, only confirmed friends can see the profile (timeline) or locate it in Search. The profile (timeline) will also no longer appear in the Suggestions section of the Home page. Friends and family can leave posts in remembrance.

In order to protect the privacy of the deceased user, we cannot provide login information for the account to anyone. However, once an account has been memorialized, it is completely secure and cannot be accessed or altered by anyone.

If you need to report a profile (timeline) to be memorialized, please click here.

While Facebook takes steps to verify requests, the requestor doesn’t have to be the decedent’s executor or even a family member, as anyone can complete the request form. This removes some control from the executor, but generally ensures that memorialization takes place at the right time.

Delete the profile

Upon request from a close family member Facebook will remove a deceased user’s profile entirely.

Quoting the FAQ again:

“We will process certain special requests for verified immediate family members, including requests to remove a loved one’s account. This will completely remove the profile (timeline) and all associated content from Facebook, so no one can view it.

For all special requests, we require verification that you are an immediate family member or executor. Requests will not be processed if we are unable to verify your relationship to the deceased.

Examples of documentation that we will accept include:

  • The deceased’s birth certificate
  • The deceased’s death certificate
  • Proof of authority under local law that you are the lawful representative of the deceased or his/her estate.

If you are an immediate family member and would like to request that we remove your loved one’s account from the site, click here. You may also use this form if you have a special request regarding the deceased user’s account.”

Download the account’s information

Recently WGRZ reported that Facebook will also allow family members to download the account contents of the deceased, if prior authorization or a court order is present.

Quoting a statement from Facebook to WGRZ:

“We will provide the estate of the deceased with a download of the account’s data if prior consent is obtained from or decreed by the deceased, or mandated by law.”  – Fred Wolens,Facebook Policy Communications

This is the first time that we’ve heard this last part of Facebook’s policy at The Digital Beyond. Essentially this means that you can leave instructions in your will for your family to have access to the information on your Facebook account, and Facebook will honor that request. Furthermore, the last statement, “mandated by law,” indicates that Facebook will comply with estate laws from several states, which essentially grant the executor access to information stored at social networking websites specifically or all electronic information, depending upon the state.

More to read about this strange issue (What happens to your Facebook account when you die?)