In this research work, we presented a new XSS defense strategy framework based on soft-computing approach designed to be more effective in widely deployed existing web browsers, despite anomalous browser behavior. Links access is paramount among web users without knowing the hidden agenda behind those links. The proposed design framework will protect users against the execution of malicious codes on their computing devices via web browser. The techniques used in this work provide not only a self-learning ability but take care of the greatest problem of the XSS scripting code which is inability of the browser to differentiate between benign and malicious codes. Because computing devices are being used by technical and as well as non technical users, this model offers every users equal security measure, as non technical users do not have the fear of not being able to successfully select the right policies to apply in order to protect their sensitive data as found in measures that are based on policies.