Category: Web Design
-
Web frontend performance tuning
I have tried some techniques to resolve some media loading problems. The lessons learned were: References:
-
Microsoft Edge Kiosk Mode /w Session Storage
What’s kiosk mode? If you go to fast food market, you may use vendor machine/self-assist machine to complete your shopping tasks. The applications in the modern operating systems we called kiosk. [1] Kiosk mode in MS edge The tutorials posted by Microsoft were for in private mode, which cannot retain users’ session data (e.g. IndexDB,…
-
A c# implementation of Websocket: Websocket-sharp
If you are finding a websocket library which completely implement Websocket protocol RFC 6455)[1]. I would like to introduce WebsocketSharp. [2] Performance tips Although there is no size implementation for websocket, the limitations of websocket implementations are different. The original websocketsharp’s text buffer(initial frame size) is 1016 characters. If you want to increase the suze,…
-
Image rendering and scaling algorithms in browsers
Image rendering control We can control the image rendering algorithms by setting image-rendering property in CSS. [1] What resize or image generation algorithms are in browser? If you’re interested in how chromium based browsers generate the images per size or quality parameters, you can refer to the source codes used in the project. [2] References
-
[WordPress] A Method for combining both of plain and custom URLs
In WordPress, we usually set the custom URLs for the purpose of SEO.For the old plain URLs which are previously published to other sites, we should maintain them by redirecting to the new custom URLs. The htaccess setting can simply do the redirection to a static page, such as response 404 not found or see…
-
HTML Specification Standard
https://html.spec.whatwg.orgThe version of HTML specification description is greater than W3C’s.
-
[Software] Pencil Project
Web developers can try the Pencil Project. It offers not only a GUI to design the webpages, but also exports all of the webpages to a single web page. These features help you a lot to present your designed pages for customers. Official Site: http://pencil.evolus.vn/
-
An easy way to fix SQL injection and XSS
In my current case, I find some PHP codes have flaws in SQL injection and XSS. After analyzing the codes, I find that the URL pameters are usual in numeric type. So, I just add the codes in the PHP file below: /* Jyun-Yao Huang modified on 2014/06/12: * Check the values of $_GET are…
-
[ASP.NET] ASP.NET撰寫時應注意的觀念
有撰寫過PHP/JSP/ASP網頁程式設計的人員請注意! ASP.NET 使用Window Form的設計模式與一般我們在使用GET/POST表單傳遞方式不一樣。 請謹記以下6個基本要點,以免到時候撰寫程式時卡東卡西的。 1. ASP.NET 採用的Window Form,預設會塞一個Form表單在裡面,請勿另外自己撰寫<form>… </form>標籤。 2. ASP.NET 控制項所有的操作,都是自動作用在自己這張頁面中(自己傳給自己)。採用的方式即是所有的動作都使用表單傳回給自己。例如,在ASP.NET專案的Default.aspx 加入以下: <asp:button id=”button1″ click=”button1_click(xxx…)”></button> 它的button1_click事件,是自動傳參數給本身的頁面(Default.aspx),頁面在接收到傳遞的資訊後,再執行click事件所委派的方法。 3. 按照ASP.NET執行流程,會先執行Page_Load方法,再依序初始化控制項,並執行其他方法。 4. 承3,由於每個動作都會引發Page_Load方法,所以要判定是否第一次存取頁面,請善用if ( this.IsPostBack … )這個判斷式,如果回傳false,代表第一次讀取頁面。若回傳true,代表第二次之後的頁面讀取。 5. 學習ASP.NET時,會使用ViewState[]、Session[] 與 Application[] 這幾個變數。差別如下: (1) ViewState[] 是將變數內嵌在html程式碼中,以<input type=’hidden’ … >的方式存在。因此,不能跨頁面存取。這類變數只能在自己本身的頁面內做存取。 (2) Session[] 可以跨頁面存取,但是無法跨站存取。 (3) Application[]: 用於跨站存取(本機內可能有多個ASP.NET應用程式)。 6. 預設具有Postback功能的就只有Button,其它的控制項若是要具有Postback功能只要將控制項的屬性AutoPostBack=”True”即可。 以上重要觀念來自文魁出版公司的ASP.NET程式設計徹底研究 (前6章節)。
-
[Javascript] JSONP: some useful tutorials
If you want to know the detail process of JSONP(JSON with Padding).There are some useful web pages: [JSONP] Use jQuery + JSONP + ASP.Net to get data via the cross-domain way. ( in Chinese) Cross-Domain Ajax (JSONP) (in Chinese)