client-side

Non-browser sent HTTP request and PHP sessions

巧了我就是萌 提交于 2019-12-12 22:59:17
问题 Is PHP able to maintain a session with devices that aren't using a browser to communicate with the server? I know that any application is capable of adhering to the HTTP protocol, but for languages like Actionscript3 and Java that consist of HTTP request classes in their frameworks, do they send the necessary parameters for PHP to hold a session like it does with a browser? 回答1: Any HTTP client library can support cookies (which is how PHP maintains session token state across requests by

Client-side JS session library

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 22:37:57
问题 I'm looking for a client-side JS library to store session variables. I'd like a library that supports alternative storage medium, e.g. cookies when available with fallback on other techniques. For instance, I found this one (but the last update is in 2009): http://code.google.com/p/sessionstorage/ I'm not interested in security (apart a bit of data isolation among applications), as I'm not going to store sensitive data. To give an example of use case, I want to display a message "Chrome user?

GWT Toolkit: preprocessing files on client side

假如想象 提交于 2019-12-12 19:59:26
问题 If there's a way for the client side GWT code to pre-process a file on the client computer? For example, to calculate a checksum of it before submitting the file to the server. 回答1: No it is not possible. The manipulation of the file is done by the browser, not the HTML code. Think about it, GWT is 100% javascript. And javascript has no access whatsoever of the file in your computer. That would be an pretty big security risk! GWT "wraps" the file input box so it can be displayed inside the

Can I open 2 ports simultaneously with single websocket server

白昼怎懂夜的黑 提交于 2019-12-12 14:05:23
问题 I am a newbie at websocket programming. Currently I am working on a simple websocket server,using c, that can respond to a websocket client. I managed to get that working with 1 client and 1 server on a single port. I want to know if I could open 2 ports, so different clients could connect to the the different ports. #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include

Using 3rd party libraries with GWT on client side?

余生颓废 提交于 2019-12-12 11:34:43
问题 I'm starting out with GWT and was wondering what libraries is it possible to use with GWT on the client side? Because GWT converts Java code into JavaScript, I can't really imagine all conversions to be possible if you are just using the client side. Of course you wouldn't wanna use everything on client side in a real application, but I'm wondering what are the physical possibilities of the converter? Is there any kind of a list of supported libraries? How do you know if they can get

How to create a text file on a client machine using javascript or jquery

折月煮酒 提交于 2019-12-12 09:24:25
问题 How to create a text file on a client machine using javascript or jquery 回答1: it is possible on IE and firefox... but wonder how it will work on Safari and Crome searching the same... for FF netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); // Open the save file dialog var nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); fp.init(window, "Save File...", nsIFilePicker.modeSave); /

validate asp fileupload control client side

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 09:17:57
问题 i have a asp fileupload control on my page. how to validate the selected file on client side. validation rules: 1. file must be jpeg,png,bmp or gif. 2. file size must be within 25 kb and 2 mb. please help. thanks. I Have Tried The Following Code to validate the extension <asp:FileUpload ID="FileUpload2" runat="server"/> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="ValidateFileUpload" ErrorMessage="Invalid file type. Only .gif, .jpg, .png, .bmp and .jpeg

forece refresh client page from server side [closed]

假如想象 提交于 2019-12-12 07:22:30
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . How may I refresh current client view page from the server side? for example, if I want to force refresh for page that is viewing now for all the clients, so they can view the new content. and I want to do this

list files in a silverlight project

谁说我不能喝 提交于 2019-12-12 05:37:58
问题 I'd like to list files in a given folder (which is in another project) in Silverlight. Actually, they are images. Project A : "/Images/a.png" "/Images/b.png" Project B : I want to list the files in "Project A/Images/" I haven't found a way to do it, can you help me ? Thanks 回答1: You can use reflection to perform this at runtime. If you set the build action of your images to "embedded resource", you can enumerate them at runtime. // locate the assembly Assembly thisAssembly = Assembly

uglifyjs on client-side javascript ? (or an alternative parser)

元气小坏坏 提交于 2019-12-12 04:35:34
问题 I need to parse (and possibly modify) a js expression from within javascript (Specifically i want to markup some eval() expressions before the actual eval) I really like the UglifyJS README examples, but alas, it needs node.js Is there any way to get this to run on clientside browser?! (i am not really a js expert so if i am completely misunderstanding this platform thingy please let me know) Failing that, is there an alternative js parser ? Currently i am looking LintJS or esprima or