All posts by Pramod T P

jQuery check if string contains another string

<html>
<head>
<script type=”text/javascript” src=”jquery.js”></script>
</head>
<div id=”divId”>
<iframe src=”http://phpcodez.com” scrolling=”no” frameborder=”0″ style=”border: none; width: 90px; height: 20px; “></iframe>
</div>
<script type=”text/javascript”>
jQuery.noConflict();
jQuery(document).ready(function() {
if(jQuery(“#divId”+” iframe”).attr(‘src’).indexOf(“https”)<=-1) {
alert(“Its not a secure url”);
}
});
</script>
</html>

jQuery

jQuery is a multi-browser JavaScript library designed to simplify the client-side scripting of HTML. It was released in January 2006 at BarCamp NYC by John Resig. Used by over 55% of the 10,000 most visited websites, jQuery is the most popular JavaScript library in use today

Completely disable any caching PHP

<?php
header(“Expires: Tue, 07 Aug 2000 08:00:00 GMT”);
header(“Last-Modified: ” . gmdate(“D, d M Y H:i:s”) . ” GMT”);
header(“Cache-Control: no-store, no-cache, must-revalidate, max-age=0”);
header(“Cache-Control: post-check=0, pre-check=0”, false);
header(“Pragma: no-cache”);
?>