Check and load any file dynamically -- 2
$10-30 USD
Dibayar saat pengiriman
I need a script/solution to use in my website, that allow to:
- check if file is already loaded (css, js, php, html, img, etc.)
- if file is loaded then it is used and avoid duplicate loading
- if file is not loaded the script check if cache exist and load file from cache
- if cache doesn't exist, the script load the file from the specified source and create cache
- project must be based on php and/or jquery
- instruction on how to use the provided code for load every file is needed
- i prefer who can start immediatelly
- I expect 1-2 hours work is enough
- Note: there is already code in the internet for check and load css and js files dynamically
[url removed, login to view]
- the solution must work for the followig cases:
a) js files
Example
<script type="text/javascript" src="[url removed, login to view]"></script>
<script src="/js/[url removed, login to view]" language="javascript"></script>
b) css files
Example
<link rel="stylesheet" href="/desk/top/[url removed, login to view]" type="text/css" media="screen"/>
c) img and video files
d) php included
Example: require_once($_SERVER['DOCUMENT_ROOT']."/[url removed, login to view]");
e) php loaded via ajax
Example
<script type="text/javascript">
$(document).ready(function() {
$('.top_service a').load('/desk/top/top_service/[url removed, login to view]');
});
</script>
f) php or other files loaded via iframe (if possible)
Example
<iframe id="main_iframe" src="/desk/center/[url removed, login to view]" width="56%" frameborder="0" scrolling="no" style="position:fixed; bottom:23px; height:80vh; background-color:#00CC00"></iframe>
g) php or other files loaded via ajax into iframe (if possible)
Example
if(loadonchange){
var vals = $(this).find('option:selected').val();
if(parseInt(vals)==vals)
$('iframe').attr('src','/desk/center/scrollnav/[url removed, login to view]'+$(this).attr('id')+'&b='+vals);
}
ID Proyek: #7899109
Tentang proyek
Diberikan kepada:
3 freelancer rata-rata menawar $52 untuk pekerjaan ini
Hi. I understand your requirements and I can complete this task for you. I can create the php code for this. Thanks!