I downloaded Google speed tracer for Google chrome to see how my site does performance wise and it tells me I need to enable caching for certain files like my style.css, images, etc.
I've read that the below php code should tell browsers to cache html content. I wrote a quick php page with a couple of images on it and stuck the below co...
I like to put all my #includes in my header file then only include my header for that source file in my source file. What is the industry standard? Are there any draw backs to my method?
...
I have created a "CollapsingPanel"class/sort of a JTabbedPane (code skeleton can be found at http://www.coderanch.com/t/341737/Swing-AWT-SWT-JFace/java/Expand-Collapse-Panels). It is in other words a lot of headers which you click on to show a hidden Panel. At the moment these header-panels are a rectangular box with a LineBorder around ...
Please check out
http://rainsongmanchesters.net/news.htm
and notice the black strip above the header image.
Now click here http://rainsongmanchesters.net/breedinfo.htm
and notice how there is no strip. Such a simple problem? It has defeated me for months! Using firebug, and just staring at the code for months has not produced any so...
Apologies for my longest question on SO ever. I'm trying to interface with a php frontend for a mysql database in ROOT (a CERN framework in C++ for high energy physics analysis). To start off with, I tried to get this php interface to play nice with wget and curl first because I'm more familiar with them. The following command works:
wg...
Hi,
While googling I found two different sets of headers that need to be set when outputting excel generated in different file format.
for e.g.
For Type "Excel5" headers are:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-dow...
Edit :
I've got an aspx file (default.aspx) that loads a flash file (index.swf), but this swf needs a xml file (foo.xml) to load correctly. However, I would like to block any request aiming directly at the xml file.
Is it possible, using a rewritting engine (isapi_rewrite for example) to detect if the xml file is being 'hotlinked' or be...
I am trying to do "POST" with XMLHttpRequest in a firefox extension, and after that I try to get the "Location" header and open it in a new tab. For some reason, the XMLHttpRequest doesn't contain a location header.
My code
function web(url,request)
{
var http = new XMLHttpRequest();
http.open('POST',url,true);
http.setReq...
Hello,
I've been trying to find a Python code that would log in to my Yahoo account from "Google App Engine". One supporter on "StackOverflow" gave me this three-step plan:
Simulate normal login and save login page that you get;
Save POST&GET headers with "Wireshark";
Compare login page with those headers and see what fields you need ...
Hi!
How to change header background of a calendar control? I need only top, not all area.
Thanks a lot!!
...
For the past 3 months my site has been using a PHP file handler in combination with htaccess.
Users accessing the uploads folder of the site would be redirected to the handler as such:
RewriteRule ^(.+)\.*$ downloader.php?f=%{REQUEST_FILENAME} [L]
The purpose of the file handler is pseudo coded below, followed by actual code.
//Chec...
I would include a php header (mysite.com/header.php) in all the pages from a site.
How to do it properly?
There are relative links:
<?php include_once 'header.php'; ?>
<?php include_once '../header.php'; ?>
And this didn't help:
<?php include_once '/header.php'; ?>
...
Currently I have a class that is extending the ListActivity class. I need to be able to add a few static buttons above the list that are always visible. I've attempted to grab the ListView using getListView() from within the class. Then I used addHeaderView(View) to add a small layout to the top of the screen.
Header.xml
<?xml versi...
Hi, I've never delt with sound clips and im wanting to play one via an event.
I have a file which has a snippet like so:
if( $get['0002'] == 'mu' ) {
switch( $get['0000'] ) {
case 'mp3': header('Content-Type: audio/mp3'); break;
case 'wav': header('Content-Type: audio/x-wav'); break;
default: break;
}
...
I am asked to get the files with no headers , i have tried many things like
wget --header="" http://xxxxx.xxxxxx.xx
plz if you know how can i get any file without headers answer me :)
...
I am trying to find a universal way to expand most if not all of the shortened URLs out there. I know short URLs such as bit.ly, TinyURL, goo.gl, etc use the 302 redirection method to redirect you to another site. How can I make a HEAD request to the shortened URL in php and get the "Location" part of the header?
Please help me with thi...
I'm displaying images from outside my web root, like this:
header('Content-type:image/png');
readfile($fullpath);
The content-type: image/png is what confuses me.
Someone else helped me out with this code, but I noticed that not all images are PNG. Many are jpg or gif.
And still they are displayed successfully.
does anyone know why...
I've this sample table and I want to make header row of table visible all the time. Header row should scroll with horizontal scrollbar and shouldn't scroll with vertical scrollbar.
table:
<div style="width:800px; height:150px;overflow:scroll;margin:50px auto;">
<table style="width:1600px" border="1">
<thead style="">
<tr>
...
Hi, im creating profile pages based on a subdomains using the wildcard DNS setting.
Problem being, if the subdomain is incorrect, I want it to redirect to the same page but without the subdomain infront ie;
if ( preg_match('/^(www\.)?([^.]+)\.domainname\.co.uk$/', $_SERVER['HTTP_HOST'], $match)) {
$DISPLAY_NAME = $match[2];
$query = "...
I've got several reports and they have been built with various formatting. Nothing huge just the header row is different between them. I'd like to pick a standard and just update the reports so they all look the same. This can be done on a textbox by textbox basis - setting the font, font color, font size and background color.
It see...