browser

Communication between browsers via PHP

拟墨画扇 提交于 2020-01-02 05:44:07
问题 I am building a simple ajax chat client for a school project and have thought of a way to implement this, but it seems IMO to be very cumbersome approach: 1) User A sends message which is accepted by a server-side PHP script and saved to database 2) The browser of User B periodically launches a server side PHP script to check if there are any messages in the database for User B. PHP script finds messages from User A and returns them. Is this the right approach? Can communication between these

Can jquery manipulate a temporary document created with DOM?

て烟熏妆下的殇ゞ 提交于 2020-01-02 05:03:15
问题 The thing that I want to achieve is to manipulate a document created with DOM using jquery by passing a big html string. Consider the following example: var doctype = document.implementation.createDocumentType( 'html', '', ''); var dom = document.implementation.createDocument('', 'html', doctype); dom.documentElement.innerHTML = '<head><head><title>A title</title></head><body><div id="test">This is another div</div></body>'; This will create a new document in dom, with the content provided.

Can jquery manipulate a temporary document created with DOM?

霸气de小男生 提交于 2020-01-02 05:03:08
问题 The thing that I want to achieve is to manipulate a document created with DOM using jquery by passing a big html string. Consider the following example: var doctype = document.implementation.createDocumentType( 'html', '', ''); var dom = document.implementation.createDocument('', 'html', doctype); dom.documentElement.innerHTML = '<head><head><title>A title</title></head><body><div id="test">This is another div</div></body>'; This will create a new document in dom, with the content provided.

Read HTML code from iframe using Webbrowser C#

时光总嘲笑我的痴心妄想 提交于 2020-01-02 04:54:13
问题 How to read IFRAME html code using WebBrowser? I have site with iframe, and after few clicks new URL opens inside this IFRAME with some portion of HTML CODE. Is there a possiblity to read this?. When I am trying to Navigate() to this URL, I am redirected to main page of this site (it is not possible to open this link twice). Uri IFRAME_URL = webBrowser1.Document.Window.Frames[0].Url; Maybe there is something similar to: Uri IFRAME_URL = webBrowser1.Document.Window.Frames[0]. ... DOCUMENTTEXT;

How long will a browser remember a “a:visited” link?

不羁岁月 提交于 2020-01-02 04:43:06
问题 How long will a browser remember a "a:visited" link? Assuming the method isn't uniform across browsers - an answer for any individual browser (or as many as you know) would be helpful. Also, under which type of memory is it stored? "Web History"? Cache? 回答1: Visited links are part of your web history, and how long they're stored depends on each user's individual browser settings. I believe Firefox remembers unlimited history by default, but anyone can set a time limit on it, or have it be

Can we compress PDF files using javascript? If yes, how & If no, why?

牧云@^-^@ 提交于 2020-01-02 04:33:16
问题 I've implemented upload documents functionality on browser where a user can upload around 4-5 documents at a time. However, when we upload the documents having file size around 5MB and having slow internet connection(set slow 3G network in the browser's dev tools), we can not upload all the files due to internet timeout! To upload documents successfully having large size and slow internet connection, I've compressed the images and it solves my issue. But the user can also upload PDF files of

Word Wrap in Raphael JS / SVG

。_饼干妹妹 提交于 2020-01-02 04:16:16
问题 How do you get words to wrap inside a box in RaphaelJS? Or in browser-based SVG in general? I found this thread on it, but it doesn't make any sense. They say to use "widthToCharNum" but as far as I can tell, this thread is the only place those words have ever been used on the internet. They suggest using a "width" attribute, but this has no effect. 回答1: Text-wrapping is not built into Raphael or the SVG spec. Period. Coming from the HTML world, I found the absence of text wrapping pretty

Force Browser to cache images

一世执手 提交于 2020-01-02 03:53:06
问题 I am generating the images and want browser to cache them forever, but instead browser never cache them at all. This is my php code header('Content-type:'.$file->content_type); header('Expires: Thu, 15 Apr '.(date('Y')+10).' 20:00:00 GMT'); header('Content-Disposition: attachment; filename="'.$file->file_name.'"'); echo(file_get_contents($model_files->files_path.$file->md5.$model_files->seprator.$file->file_name)); and these are the response headers which i keep getting in browser. Date: Thu,

PHPQuery WebBrowser plugin - using cookies

爷,独闯天下 提交于 2020-01-02 03:49:08
问题 I'm trying to login into a website using PHPQuery's WebBrowser plugin. I'm able to successfully login but I'm not sure how to reuse cookies from a previous call to the next. $client = phpQuery::browserGet('https://website.com/login', 'success1'); function success1($browser) { $handle = $browser ->WebBrowser('success2'); $handle ->find('input[name=name]') ->val('username'); $handle ->find('input[name=pass]') ->val('password') ->parents('form') ->submit(); } function success2($browser) { print

How to invoke phone dialer in browser? or is it impossible?

折月煮酒 提交于 2020-01-02 01:15:12
问题 I build a website for phones like android and iphone,when users are visiting my site,is it possible for me to invoke some system build in activities like Dialer or SMS)? I want to implement this cause I hope when user click the link with phone number,I can start to call directly. ************Edit******************* I think it is possible cause in android when I click a url like this: <html> <body> <a href="market://search?q=pname:com.joelapenna.foursquared">asdfasdfsdf</a> </body> </html> it